summaryrefslogtreecommitdiff
path: root/src/content/media.js
diff options
context:
space:
mode:
authorhackademix2018-07-26 19:33:46 +0200
committerhackademix2018-07-26 19:33:46 +0200
commitd3cacf634fad5a80c8a715df60d3e53f008252df (patch)
tree377b4f57c20a3f64b8d5f4a754a0aafe6cb61b9c /src/content/media.js
parenta8a6dd4c7bd47ff6960fd71d1a20d151fa08de12 (diff)
downloadnoscript-d3cacf634fad5a80c8a715df60d3e53f008252df.tar.gz
noscript-d3cacf634fad5a80c8a715df60d3e53f008252df.tar.xz
noscript-d3cacf634fad5a80c8a715df60d3e53f008252df.zip
More edge cases covered in dynamic script injection.
Diffstat (limited to 'src/content/media.js')
-rw-r--r--src/content/media.js7
1 files changed, 3 insertions, 4 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;
}