Skip to content

Commit 3a29da3

Browse files
ghostery-adblocker-bot[bot]Ghostery Adblocker Bot
andauthored
Update scriptlets (#15)
Co-authored-by: Ghostery Adblocker Bot <ghostery-adblocker-bot@users.noreply.github.com>
1 parent 128b469 commit 3a29da3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"type": "module",
77
"scripts": {
8-
"build": "deno build.ts --tagName 1.65.1b0 > ubo.js",
8+
"build": "deno build.ts --tagName 1.65.1b2 > ubo.js",
99
"test": "node --test"
1010
},
1111
"author": {

ubo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24912,7 +24912,7 @@ function getExceptionTokenFn() {
2491224912
}.bind();
2491324913
return token;
2491424914
}
24915-
function abortCurrentScriptCore(
24915+
function abortCurrentScriptFn(
2491624916
target = '',
2491724917
needle = '',
2491824918
context = ''
@@ -24947,8 +24947,9 @@ function abortCurrentScriptCore(
2494724947
const debug = shouldDebug(extraArgs);
2494824948
const exceptionToken = getExceptionTokenFn();
2494924949
const scriptTexts = new WeakMap();
24950+
const textContentGetter = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent').get;
2495024951
const getScriptText = elem => {
24951-
let text = elem.textContent;
24952+
let text = textContentGetter.call(elem);
2495224953
if ( text.trim() !== '' ) { return text; }
2495324954
if ( scriptTexts.has(elem) ) { return scriptTexts.get(elem); }
2495424955
const [ , mime, content ] =
@@ -25019,7 +25020,7 @@ function abortCurrentScriptCore(
2501925020
}
2502025021
function abortCurrentScript(...args) {
2502125022
runAtHtmlElementFn(( ) => {
25022-
abortCurrentScriptCore(...args);
25023+
abortCurrentScriptFn(...args);
2502325024
});
2502425025
};
2502525026
abortCurrentScript(...args);

0 commit comments

Comments
 (0)