From 2cbbc300847de5451815291446f2403db0dca371 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 9 Mar 2020 11:34:49 -0400 Subject: [PATCH] Also remove text node in `:remove()` operator Related discussion: - https://github.com/gorhill/uBO-Extra/issues/119#issuecomment-537842967 As an incidental side effect, this may or may not prevent execution of the content of some inline script tags. --- src/js/contentscript.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/contentscript.js b/src/js/contentscript.js index cefa1930e..f65c3b94f 100644 --- a/src/js/contentscript.js +++ b/src/js/contentscript.js @@ -813,6 +813,7 @@ vAPI.DOMFilterer = (function() { removeNodes(nodes) { for ( const node of nodes ) { + node.textContent = ''; node.remove(); } }