Improve `trusted-replace-node-text` scriptlet

Related discussion:
https://github.com/uBlockOrigin/uAssets/discussions/24143
This commit is contained in:
Raymond Hill 2024-06-18 10:01:27 -04:00
parent bdb99862ce
commit cb0f65e035
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 0 deletions

View File

@ -764,6 +764,7 @@ function replaceNodeTextFn(
count += 1; count += 1;
if ( node === null ) { break; } if ( node === null ) { break; }
if ( reNodeName.test(node.nodeName) === false ) { continue; } if ( reNodeName.test(node.nodeName) === false ) { continue; }
if ( node === document.currentScript ) { continue; }
if ( handleNode(node) ) { continue; } if ( handleNode(node) ) { continue; }
stop(); break; stop(); break;
} }