summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2019-04-29 10:31:19 +0200
committerhackademix2019-04-29 10:31:19 +0200
commit4fa4e55b624ff432b6db14b1dfa1bac4087a30d3 (patch)
tree0a5f6c46b71b1f792cd933d82abceb295fce4144 /src
parent43770cbc85955a1035669db3b2b33c172fb94c15 (diff)
downloadnoscript-4fa4e55b624ff432b6db14b1dfa1bac4087a30d3.tar.gz
noscript-4fa4e55b624ff432b6db14b1dfa1bac4087a30d3.tar.xz
noscript-4fa4e55b624ff432b6db14b1dfa1bac4087a30d3.zip
Skip MediaSource patching where it's disabled by browser settings.
Diffstat (limited to 'src')
-rw-r--r--src/content/media.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/media.js b/src/content/media.js
index 770a43f..4b8f852 100644
--- a/src/content/media.js
+++ b/src/content/media.js
@@ -1,4 +1,5 @@
-ns.on("capabilities", event => {
+
+if ("MediaSource" in window) ns.on("capabilities", event => {
debug("Media Hook", document.URL, document.documentElement && document.documentElement.innerHTML, ns.capabilities); // DEV_ONLY
let mediaBlocker = !ns.allows("media");
let unpatched = new Map();