From f4a94bed13a8595ec8a15e3ea8315aeb5aecc744 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Sat, 9 Mar 2024 08:57:59 +0530 Subject: A lot of changes :) --- src/scripts/stop-blocking.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/scripts/stop-blocking.ts') 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; -- cgit v1.2.3