diff options
author | hackademix | 2018-07-26 19:33:46 +0200 |
---|---|---|
committer | hackademix | 2018-07-26 19:33:46 +0200 |
commit | d3cacf634fad5a80c8a715df60d3e53f008252df (patch) | |
tree | 377b4f57c20a3f64b8d5f4a754a0aafe6cb61b9c /src/content/webglHook.js | |
parent | a8a6dd4c7bd47ff6960fd71d1a20d151fa08de12 (diff) | |
download | noscript-d3cacf634fad5a80c8a715df60d3e53f008252df.tar.gz noscript-d3cacf634fad5a80c8a715df60d3e53f008252df.tar.xz noscript-d3cacf634fad5a80c8a715df60d3e53f008252df.zip |
More edge cases covered in dynamic script injection.
Diffstat (limited to 'src/content/webglHook.js')
-rw-r--r-- | src/content/webglHook.js | 9 |
1 files changed, 3 insertions, 6 deletions
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; |