summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorhackademix2019-07-21 10:15:37 +0200
committerhackademix2019-07-23 18:11:14 +0200
commitdc2cf89b3f50880ede81dd874238917e8445d7e4 (patch)
treefc8965447c35cdb24e396f34b860e3d623e14be3 /src/ui
parentc7f053a622a6f8b783dafa3de9a34ffb31bb5e41 (diff)
downloadnoscript-dc2cf89b3f50880ede81dd874238917e8445d7e4.tar.gz
noscript-dc2cf89b3f50880ede81dd874238917e8445d7e4.tar.xz
noscript-dc2cf89b3f50880ede81dd874238917e8445d7e4.zip
Update childNode.parentNode.removeChild(childNode) pattern to childNode.remove().
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/ui.js b/src/ui/ui.js
index a387d6e..2ebaa41 100644
--- a/src/ui/ui.js
+++ b/src/ui/ui.js
@@ -162,7 +162,7 @@ var UI = (() => {
canary.style.display = "none";
document.body.appendChild(canary);
UI.highContrast = window.getComputedStyle(canary).backgroundImage === "none";
- canary.parentNode.removeChild(canary);
+ canary.remove();
}
return UI.highContrast;
}
@@ -361,7 +361,7 @@ var UI = (() => {
this.rowTemplate = this.initRow();
for (let r of this.allSiteRows()) {
- r.parentNode.removeChild(r);
+ r.remove();
}
this.customize(null);
this.sitesCount = 0;
@@ -760,7 +760,7 @@ var UI = (() => {
policy.set(site, row.perms);
for(let r of this.allSiteRows()) {
if (r !== row && r.siteMatch === site && r.contextMatch === row.contextMatch) {
- r.parentNode.removeChild(r);
+ r.remove();
}
}
let newRow = this.createSiteRow(site, site, row.perms, row.contextMatch, row.sitesCount);