Skip to content

Commit 0eb10ff

Browse files
ghostery-adblocker-bot[bot]Ghostery Adblocker Bot
andauthored
Update scriptlets (#40)
Co-authored-by: Ghostery Adblocker Bot <ghostery-adblocker-bot@users.noreply.github.com>
1 parent 4fecd62 commit 0eb10ff

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
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.68.1rc1 > ubo.js",
8+
"build": "deno build.ts --tagName 1.68.1rc2 > ubo.js",
99
"test": "node --test"
1010
},
1111
"author": {

ubo.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ aliases: ["urlskip.js"],
12561256
world: 'ISOLATED',
12571257
requiresTrust: false,
12581258
func: function (scriptletGlobals = {}, ...args) {
1259-
function urlSkip(url, blocked, steps, directive = {}) {
1259+
function urlSkip(url, blocked, steps) {
12601260
try {
12611261
let redirectBlocked = false;
12621262
let urlout = url;
@@ -1316,10 +1316,7 @@ function urlSkip(url, blocked, steps, directive = {}) {
13161316
}
13171317
// Regex extraction from first capture group
13181318
if ( c0 === 0x2F ) { // /
1319-
const re = directive.cache ?? new RegExp(step.slice(1, -1));
1320-
if ( directive.cache === null ) {
1321-
directive.cache = re;
1322-
}
1319+
const re = new RegExp(step.slice(1, -1));
13231320
const match = re.exec(urlin);
13241321
if ( match === null ) { return; }
13251322
if ( match.length <= 1 ) { return; }
@@ -32907,7 +32904,7 @@ function trustedClickElement(
3290732904
return chrome.dom.openOrClosedShadowRoot(elem);
3290832905
}
3290932906
}
32910-
return null;
32907+
return elem.shadowRoot;
3291132908
};
3291232909

3291332910
const querySelectorEx = (selector, context = document) => {

0 commit comments

Comments
 (0)