@duckduckgo/autoconsent 16.42.0 → 16.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/user-settings.json.TEMPLATE +22 -0
- package/CHANGELOG.md +28 -0
- package/ci/asana-update-tasks.js +1 -1
- package/dist/addon-firefox/background.bundle.js +18 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +19 -1
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +18 -0
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +19 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +19 -1
- package/dist/autoconsent.esm.js +19 -1
- package/dist/autoconsent.playwright.js +19 -1
- package/dist/autoconsent.standalone.js +20 -2
- package/dist/types/eval-snippets.d.ts +1 -0
- package/lib/dom-actions.ts +1 -1
- package/lib/eval-snippets.ts +20 -0
- package/package.json +2 -3
- package/readme.md +10 -0
- package/rules/autoconsent/sourcepoint-top.json +3 -2
- package/rules/compact-rules.json +1 -1
- package/rules/rules.json +1 -1
- package/tsconfig.json +1 -0
|
@@ -374,6 +374,24 @@
|
|
|
374
374
|
});
|
|
375
375
|
return true;
|
|
376
376
|
},
|
|
377
|
+
EVAL_SOURCEPOINT_RESTORE_SCROLL: () => {
|
|
378
|
+
const root = document.documentElement;
|
|
379
|
+
const saved = root.dataset.previousScrollY;
|
|
380
|
+
if (saved && saved !== "null") {
|
|
381
|
+
root.dataset.previousScrollY = "null";
|
|
382
|
+
const y = -parseInt(saved, 10);
|
|
383
|
+
if (y > 0 && window.scrollY === 0) {
|
|
384
|
+
const behavior = root.style.scrollBehavior;
|
|
385
|
+
root.style.scrollBehavior = "auto";
|
|
386
|
+
window.scrollTo(0, y);
|
|
387
|
+
root.style.scrollBehavior = behavior;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
window.addEventListener("pagehide", () => {
|
|
391
|
+
if (root.dataset.previousScrollY) root.dataset.previousScrollY = "null";
|
|
392
|
+
});
|
|
393
|
+
return true;
|
|
394
|
+
},
|
|
377
395
|
EVAL_STEAMPOWERED_0: () => JSON.parse(
|
|
378
396
|
decodeURIComponent(
|
|
379
397
|
document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1]
|
|
@@ -2669,7 +2687,7 @@
|
|
|
2669
2687
|
if (selector.startsWith("xpath/")) {
|
|
2670
2688
|
const xpath = selector.slice(6);
|
|
2671
2689
|
const result = document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
|
|
2672
|
-
let node
|
|
2690
|
+
let node;
|
|
2673
2691
|
const elements = [];
|
|
2674
2692
|
while (node = result.iterateNext()) {
|
|
2675
2693
|
elements.push(node);
|