diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/media.js | 7 | ||||
-rw-r--r-- | src/content/webglHook.js | 9 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/content/media.js b/src/content/media.js index b975bef..ead6e05 100644 --- a/src/content/media.js +++ b/src/content/media.js @@ -1,5 +1,5 @@ -debug("Media Hook (blocked %s)", !!window.mediaBlocker, document.URL, document.documentElement && document.documentElement.innerHTML); -try { +if (correctFrame()) { + debug("Media Hook (blocked %s)", !!window.mediaBlocker, document.URL, document.documentElement && document.documentElement.innerHTML); (() => { let unpatched = new Map(); function patch(obj, methodName, replacement) { @@ -56,6 +56,5 @@ try { }); })(); -} catch (e) { - error(e, "Cannot patch MediaSource"); + document.URL; } diff --git a/src/content/webglHook.js b/src/content/webglHook.js index c3b7aaa..39637e2 100644 --- a/src/content/webglHook.js +++ b/src/content/webglHook.js @@ -1,5 +1,5 @@ -debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML); -try { +if (correctFrame()) { + debug("WebGL Hook", document.URL, document.documentElement && document.documentElement.innerHTML); let proto = HTMLCanvasElement.prototype; let getContext = proto.getContext; exportFunction(function(type, ...rest) { @@ -24,8 +24,5 @@ try { } return getContext.call(this, type, ...rest); }, proto, {defineAs: "getContext"}); -} catch (e) { - console.error(e); + document.URL; } - -null; |