From 687e635f3cd7eb877f5bc517b90879b1b2d28401 Mon Sep 17 00:00:00 2001 From: Ghostery Adblocker Bot Date: Mon, 21 Jul 2025 20:09:01 +0000 Subject: [PATCH] Update scriptlets --- package.json | 2 +- ubo.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a7b4971..dd4ff89 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "type": "module", "scripts": { - "build": "deno build.ts --tagName 1.65.1b0 > ubo.js", + "build": "deno build.ts --tagName 1.65.1b2 > ubo.js", "test": "node --test" }, "author": { diff --git a/ubo.js b/ubo.js index a2a0dc0..5c1287a 100644 --- a/ubo.js +++ b/ubo.js @@ -24912,7 +24912,7 @@ function getExceptionTokenFn() { }.bind(); return token; } -function abortCurrentScriptCore( +function abortCurrentScriptFn( target = '', needle = '', context = '' @@ -24947,8 +24947,9 @@ function abortCurrentScriptCore( const debug = shouldDebug(extraArgs); const exceptionToken = getExceptionTokenFn(); const scriptTexts = new WeakMap(); + const textContentGetter = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent').get; const getScriptText = elem => { - let text = elem.textContent; + let text = textContentGetter.call(elem); if ( text.trim() !== '' ) { return text; } if ( scriptTexts.has(elem) ) { return scriptTexts.get(elem); } const [ , mime, content ] = @@ -25019,7 +25020,7 @@ function abortCurrentScriptCore( } function abortCurrentScript(...args) { runAtHtmlElementFn(( ) => { - abortCurrentScriptCore(...args); + abortCurrentScriptFn(...args); }); }; abortCurrentScript(...args);