@duckduckgo/autoconsent 16.16.0 → 16.18.0

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.
Files changed (45) hide show
  1. package/.agents/skills/proxy-testing/SKILL.md +17 -3
  2. package/.agents/skills/proxy-testing/scripts/regional-proxy.mjs +10 -3
  3. package/AGENTS.md +5 -4
  4. package/CHANGELOG.md +35 -0
  5. package/dist/addon-firefox/compact-rules.json +1 -1
  6. package/dist/addon-firefox/content.bundle.js +0 -90
  7. package/dist/addon-firefox/manifest.json +1 -1
  8. package/dist/addon-firefox/rule-index.json +1 -1
  9. package/dist/addon-firefox/rules.json +1 -1
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +0 -90
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/rule-index.json +1 -1
  14. package/dist/addon-mv3/rules.json +1 -1
  15. package/dist/autoconsent.cjs.js +0 -90
  16. package/dist/autoconsent.esm.js +0 -90
  17. package/dist/autoconsent.playwright.js +0 -90
  18. package/dist/autoconsent.standalone.js +1 -91
  19. package/lib/cmps/all.ts +0 -2
  20. package/package.json +1 -1
  21. package/rules/autoconsent/borlabs.json +48 -17
  22. package/rules/autoconsent/pornhub.json +27 -3
  23. package/rules/autoconsent/samsung-com.json +1 -1
  24. package/rules/autoconsent/theguardian.com.json +21 -0
  25. package/rules/autoconsent/youtube-mobile.json +1 -0
  26. package/rules/compact-rules.json +1 -1
  27. package/rules/rule-index.json +1 -1
  28. package/rules/rules.json +1 -1
  29. package/tests/borlabs.spec.ts +1 -1
  30. package/tests/onetrust.spec.ts +4 -0
  31. package/tests/pornhub.spec.ts +2 -1
  32. package/tests/sourcepoint.spec.ts +7 -6
  33. package/tests/theguardian.com.spec.ts +11 -0
  34. package/tests/trustarc-newcm.spec.ts +1 -1
  35. package/tests/trustarc.spec.ts +0 -7
  36. package/tests-wtr/rules/cmp-test-urls.json +0 -1
  37. package/dist/types/cmps/trustarc-frame.d.ts +0 -15
  38. package/lib/cmps/trustarc-frame.ts +0 -126
  39. package/rules/autoconsent/complianz-opt-both.json +0 -12
  40. package/rules/autoconsent/deepl.json +0 -14
  41. package/rules/autoconsent/jdsports.json +0 -41
  42. package/rules/autoconsent/pornhub-compact-cookie-banner.json +0 -28
  43. package/tests/complianz-opt-both.spec.ts +0 -3
  44. package/tests/deepl.spec.ts +0 -5
  45. package/tests/jdsports.spec.ts +0 -3
@@ -1811,95 +1811,6 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1811
1811
  }
1812
1812
  };
1813
1813
 
1814
- // lib/cmps/trustarc-frame.ts
1815
- var TrustArcFrame = class extends AutoConsentCMPBase {
1816
- constructor() {
1817
- super(...arguments);
1818
- this.name = "TrustArc-frame";
1819
- this.runContext = {
1820
- main: false,
1821
- frame: true,
1822
- urlPattern: "^https://consent-pref\\.trustarc\\.com/\\?"
1823
- };
1824
- }
1825
- get hasSelfTest() {
1826
- return true;
1827
- }
1828
- get isIntermediate() {
1829
- return false;
1830
- }
1831
- get isCosmetic() {
1832
- return false;
1833
- }
1834
- async detectCmp() {
1835
- return true;
1836
- }
1837
- async detectPopup() {
1838
- return this.elementVisible("#defaultpreferencemanager", "any") && this.elementVisible(".mainContent", "any");
1839
- }
1840
- async navigateToSettings() {
1841
- await waitFor(
1842
- async () => {
1843
- return this.elementExists(".shp") || this.elementVisible(".advance", "any") || this.elementExists(".switch span:first-child");
1844
- },
1845
- 10,
1846
- 500
1847
- );
1848
- if (this.elementExists(".shp")) {
1849
- await this.click(".shp");
1850
- }
1851
- await this.waitForElement(".prefPanel", 5e3);
1852
- if (this.elementVisible(".advance", "any")) {
1853
- await this.click(".advance");
1854
- }
1855
- return await waitFor(() => this.elementVisible(".switch span:first-child", "any"), 5, 1e3);
1856
- }
1857
- async optOut() {
1858
- let timeout = 3e3;
1859
- if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1860
- timeout = 1500;
1861
- }
1862
- await waitFor(() => document.readyState === "complete", 20, 100);
1863
- await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1864
- if (await this.click(".rejectAll,.declineAllButtonLower", true)) {
1865
- return true;
1866
- }
1867
- if (this.elementExists(".prefPanel")) {
1868
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1869
- }
1870
- if (await this.click("#catDetails0")) {
1871
- await this.click(".submit");
1872
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1873
- return true;
1874
- }
1875
- if (await this.click(".required")) {
1876
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1877
- return true;
1878
- }
1879
- await this.navigateToSettings();
1880
- await this.click(".switch span:nth-child(1):not(.active)", true);
1881
- await this.click(".submit");
1882
- this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1883
- return true;
1884
- }
1885
- async optIn() {
1886
- if (await this.click(".call")) {
1887
- return true;
1888
- }
1889
- await this.navigateToSettings();
1890
- await this.click(".switch span:nth-child(2)", true);
1891
- await this.click(".submit");
1892
- this.waitForElement("#gwt-debug-close_id", 3e5).then(() => {
1893
- this.click("#gwt-debug-close_id");
1894
- });
1895
- return true;
1896
- }
1897
- async test() {
1898
- await this.wait(500);
1899
- return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1900
- }
1901
- };
1902
-
1903
1814
  // lib/cmps/cookiebot.ts
1904
1815
  var Cookiebot = class extends AutoConsentCMPBase {
1905
1816
  constructor() {
@@ -2630,7 +2541,6 @@ var Admiral = class extends AutoConsentCMPBase {
2630
2541
  // lib/cmps/all.ts
2631
2542
  var dynamicCMPs = [
2632
2543
  TrustArcTop,
2633
- TrustArcFrame,
2634
2544
  Cookiebot,
2635
2545
  SourcePoint,
2636
2546
  ConsentManager,
@@ -1781,95 +1781,6 @@ var TrustArcTop = class extends AutoConsentCMPBase {
1781
1781
  }
1782
1782
  };
1783
1783
 
1784
- // lib/cmps/trustarc-frame.ts
1785
- var TrustArcFrame = class extends AutoConsentCMPBase {
1786
- constructor() {
1787
- super(...arguments);
1788
- this.name = "TrustArc-frame";
1789
- this.runContext = {
1790
- main: false,
1791
- frame: true,
1792
- urlPattern: "^https://consent-pref\\.trustarc\\.com/\\?"
1793
- };
1794
- }
1795
- get hasSelfTest() {
1796
- return true;
1797
- }
1798
- get isIntermediate() {
1799
- return false;
1800
- }
1801
- get isCosmetic() {
1802
- return false;
1803
- }
1804
- async detectCmp() {
1805
- return true;
1806
- }
1807
- async detectPopup() {
1808
- return this.elementVisible("#defaultpreferencemanager", "any") && this.elementVisible(".mainContent", "any");
1809
- }
1810
- async navigateToSettings() {
1811
- await waitFor(
1812
- async () => {
1813
- return this.elementExists(".shp") || this.elementVisible(".advance", "any") || this.elementExists(".switch span:first-child");
1814
- },
1815
- 10,
1816
- 500
1817
- );
1818
- if (this.elementExists(".shp")) {
1819
- await this.click(".shp");
1820
- }
1821
- await this.waitForElement(".prefPanel", 5e3);
1822
- if (this.elementVisible(".advance", "any")) {
1823
- await this.click(".advance");
1824
- }
1825
- return await waitFor(() => this.elementVisible(".switch span:first-child", "any"), 5, 1e3);
1826
- }
1827
- async optOut() {
1828
- let timeout = 3e3;
1829
- if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1830
- timeout = 1500;
1831
- }
1832
- await waitFor(() => document.readyState === "complete", 20, 100);
1833
- await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1834
- if (await this.click(".rejectAll,.declineAllButtonLower", true)) {
1835
- return true;
1836
- }
1837
- if (this.elementExists(".prefPanel")) {
1838
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1839
- }
1840
- if (await this.click("#catDetails0")) {
1841
- await this.click(".submit");
1842
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1843
- return true;
1844
- }
1845
- if (await this.click(".required")) {
1846
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1847
- return true;
1848
- }
1849
- await this.navigateToSettings();
1850
- await this.click(".switch span:nth-child(1):not(.active)", true);
1851
- await this.click(".submit");
1852
- this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1853
- return true;
1854
- }
1855
- async optIn() {
1856
- if (await this.click(".call")) {
1857
- return true;
1858
- }
1859
- await this.navigateToSettings();
1860
- await this.click(".switch span:nth-child(2)", true);
1861
- await this.click(".submit");
1862
- this.waitForElement("#gwt-debug-close_id", 3e5).then(() => {
1863
- this.click("#gwt-debug-close_id");
1864
- });
1865
- return true;
1866
- }
1867
- async test() {
1868
- await this.wait(500);
1869
- return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1870
- }
1871
- };
1872
-
1873
1784
  // lib/cmps/cookiebot.ts
1874
1785
  var Cookiebot = class extends AutoConsentCMPBase {
1875
1786
  constructor() {
@@ -2600,7 +2511,6 @@ var Admiral = class extends AutoConsentCMPBase {
2600
2511
  // lib/cmps/all.ts
2601
2512
  var dynamicCMPs = [
2602
2513
  TrustArcTop,
2603
- TrustArcFrame,
2604
2514
  Cookiebot,
2605
2515
  SourcePoint,
2606
2516
  ConsentManager,
@@ -1783,95 +1783,6 @@
1783
1783
  }
1784
1784
  };
1785
1785
 
1786
- // lib/cmps/trustarc-frame.ts
1787
- var TrustArcFrame = class extends AutoConsentCMPBase {
1788
- constructor() {
1789
- super(...arguments);
1790
- this.name = "TrustArc-frame";
1791
- this.runContext = {
1792
- main: false,
1793
- frame: true,
1794
- urlPattern: "^https://consent-pref\\.trustarc\\.com/\\?"
1795
- };
1796
- }
1797
- get hasSelfTest() {
1798
- return true;
1799
- }
1800
- get isIntermediate() {
1801
- return false;
1802
- }
1803
- get isCosmetic() {
1804
- return false;
1805
- }
1806
- async detectCmp() {
1807
- return true;
1808
- }
1809
- async detectPopup() {
1810
- return this.elementVisible("#defaultpreferencemanager", "any") && this.elementVisible(".mainContent", "any");
1811
- }
1812
- async navigateToSettings() {
1813
- await waitFor(
1814
- async () => {
1815
- return this.elementExists(".shp") || this.elementVisible(".advance", "any") || this.elementExists(".switch span:first-child");
1816
- },
1817
- 10,
1818
- 500
1819
- );
1820
- if (this.elementExists(".shp")) {
1821
- await this.click(".shp");
1822
- }
1823
- await this.waitForElement(".prefPanel", 5e3);
1824
- if (this.elementVisible(".advance", "any")) {
1825
- await this.click(".advance");
1826
- }
1827
- return await waitFor(() => this.elementVisible(".switch span:first-child", "any"), 5, 1e3);
1828
- }
1829
- async optOut() {
1830
- let timeout = 3e3;
1831
- if (await this.mainWorldEval("EVAL_TRUSTARC_FRAME_GTM")) {
1832
- timeout = 1500;
1833
- }
1834
- await waitFor(() => document.readyState === "complete", 20, 100);
1835
- await this.waitForElement(".mainContent[aria-hidden=false]", timeout);
1836
- if (await this.click(".rejectAll,.declineAllButtonLower", true)) {
1837
- return true;
1838
- }
1839
- if (this.elementExists(".prefPanel")) {
1840
- await this.waitForElement('.prefPanel[style="visibility: visible;"]', timeout);
1841
- }
1842
- if (await this.click("#catDetails0")) {
1843
- await this.click(".submit");
1844
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1845
- return true;
1846
- }
1847
- if (await this.click(".required")) {
1848
- this.waitForThenClick("#gwt-debug-close_id", timeout);
1849
- return true;
1850
- }
1851
- await this.navigateToSettings();
1852
- await this.click(".switch span:nth-child(1):not(.active)", true);
1853
- await this.click(".submit");
1854
- this.waitForThenClick("#gwt-debug-close_id", timeout * 10);
1855
- return true;
1856
- }
1857
- async optIn() {
1858
- if (await this.click(".call")) {
1859
- return true;
1860
- }
1861
- await this.navigateToSettings();
1862
- await this.click(".switch span:nth-child(2)", true);
1863
- await this.click(".submit");
1864
- this.waitForElement("#gwt-debug-close_id", 3e5).then(() => {
1865
- this.click("#gwt-debug-close_id");
1866
- });
1867
- return true;
1868
- }
1869
- async test() {
1870
- await this.wait(500);
1871
- return await this.mainWorldEval("EVAL_TRUSTARC_FRAME_TEST");
1872
- }
1873
- };
1874
-
1875
1786
  // lib/cmps/cookiebot.ts
1876
1787
  var Cookiebot = class extends AutoConsentCMPBase {
1877
1788
  constructor() {
@@ -2602,7 +2513,6 @@
2602
2513
  // lib/cmps/all.ts
2603
2514
  var dynamicCMPs = [
2604
2515
  TrustArcTop,
2605
- TrustArcFrame,
2606
2516
  Cookiebot,
2607
2517
  SourcePoint,
2608
2518
  ConsentManager,