summaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorhackademix2018-12-06 22:51:53 +0100
committerhackademix2018-12-06 22:51:53 +0100
commit8f0bdc149339d8933f88530dc2ecae81b58281d1 (patch)
treee0c54b7c1375da9c48c2364be4167e1df2436d11 /src/content
parent07b90848293f3a0c387209d5f175d7804c196cd5 (diff)
downloadnoscript-8f0bdc149339d8933f88530dc2ecae81b58281d1.tar.gz
noscript-8f0bdc149339d8933f88530dc2ecae81b58281d1.tar.xz
noscript-8f0bdc149339d8933f88530dc2ecae81b58281d1.zip
Fix restored media element from placeholder not loading previously blocked content.
Diffstat (limited to 'src/content')
-rw-r--r--src/content/PlaceHolder.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/PlaceHolder.js b/src/content/PlaceHolder.js
index ac4dc14..8f31951 100644
--- a/src/content/PlaceHolder.js
+++ b/src/content/PlaceHolder.js
@@ -144,7 +144,7 @@ var PlaceHolder = (() => {
replacement._placeHolderElement = element;
- element.parentNode.replaceChild(replacement, element);
+ element.replaceWith(replacement);
this.replacements.add(replacement);
}
@@ -162,8 +162,8 @@ var PlaceHolder = (() => {
return;
}
try {
- var element = replacement._placeHolderElement;
- replacement.parentNode.replaceChild(element, replacement);
+ let element = replacement._placeHolderElement;
+ replacement.replaceWith(element.cloneNode(true));
this.replacements.delete(replacement);
} catch (e) {
error(e, "While replacing");