diff options
author | hackademix | 2019-06-15 20:42:39 +0200 |
---|---|---|
committer | hackademix | 2019-06-15 20:42:39 +0200 |
commit | 48d03247ff4ec61e27126a9b75261fe90e843f5f (patch) | |
tree | bf3815e9ab5e4fa5aa0a184c4b1d94688fa35443 /src/content | |
parent | a4f088211e3b8c274d1755d542fac737679d7a56 (diff) | |
download | noscript-48d03247ff4ec61e27126a9b75261fe90e843f5f.tar.gz noscript-48d03247ff4ec61e27126a9b75261fe90e843f5f.tar.xz noscript-48d03247ff4ec61e27126a9b75261fe90e843f5f.zip |
Fixed media replacement broken when <source> elements are used.
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/PlaceHolder.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/content/PlaceHolder.js b/src/content/PlaceHolder.js index 8f57b4f..b7090ce 100644 --- a/src/content/PlaceHolder.js +++ b/src/content/PlaceHolder.js @@ -34,7 +34,7 @@ var PlaceHolder = (() => { new Handler("frame", "iframe"); new Handler("object", "object, embed"); - new Handler("media", "video, audio"); + new Handler("media", "video, audio, source"); function cloneStyle(src, dest, props = ["width", "height", "position", "*", "margin*"]) { @@ -106,6 +106,10 @@ var PlaceHolder = (() => { replace(element) { if (!element.parentElement) return; + if (element.parentElement instanceof HTMLMediaElement) { + this.replace(element.parentElement); + return; + } let { url } = this.request; |