@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.
@@ -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 = null;
2690
+ let node;
2673
2691
  const elements = [];
2674
2692
  while (node = result.iterateNext()) {
2675
2693
  elements.push(node);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2026.9.22",
4
+ "version": "2026.9.29",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"