aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/stop-blocking.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/stop-blocking.ts')
-rw-r--r--src/scripts/stop-blocking.ts26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/scripts/stop-blocking.ts b/src/scripts/stop-blocking.ts
index f418f66..bf9ae4e 100644
--- a/src/scripts/stop-blocking.ts
+++ b/src/scripts/stop-blocking.ts
@@ -1,22 +1,22 @@
-const proxiedBind = $.prototype.bind;
+document.addEventListener("DOMContentLoaded", () => {
+ const proxiedBind = $.prototype.bind;
-$.prototype.bind = function() {
- if (arguments[0].trim() === "cut copy paste") {
- arguments[1] = (e: any) => {};
- }
+ $.prototype.bind = function() {
+ if (arguments[0].trim() === "cut copy paste") {
+ arguments[1] = (e: any) => {};
+ }
- return proxiedBind.apply(this, Array.from(arguments) as any);
-}
+ return proxiedBind.apply(this, Array.from(arguments) as any);
+ }
-const proxiedKeydown = $.prototype.keydown;
+ const proxiedKeydown = $.prototype.keydown;
-$.prototype.keydown = function() {
- arguments[0] = (e: any) => true;
+ $.prototype.keydown = function() {
+ arguments[0] = (e: any) => true;
- return proxiedKeydown.apply(this, Array.from(arguments) as any);
-}
+ return proxiedKeydown.apply(this, Array.from(arguments) as any);
+ }
-document.addEventListener("DOMContentLoaded", () => {
$.prototype.bind = proxiedBind;
$.prototype.keydown = proxiedKeydown;
document.oncontextmenu = new Function("return true") as any;