From 48d03247ff4ec61e27126a9b75261fe90e843f5f Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 15 Jun 2019 20:42:39 +0200 Subject: Fixed media replacement broken when elements are used. --- src/content/PlaceHolder.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3