@duckduckgo/autoconsent 14.67.0 → 14.69.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 (67) hide show
  1. package/AGENTS.md +36 -11
  2. package/CHANGELOG.md +39 -0
  3. package/data/coverage.json +5846 -2663
  4. package/dist/addon-firefox/background.bundle.js +0 -2
  5. package/dist/addon-firefox/compact-rules.json +1 -1
  6. package/dist/addon-firefox/content.bundle.js +17 -5
  7. package/dist/addon-firefox/manifest.json +1 -1
  8. package/dist/addon-firefox/rules.json +1 -1
  9. package/dist/addon-mv3/background.bundle.js +0 -2
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +17 -5
  12. package/dist/addon-mv3/manifest.json +1 -1
  13. package/dist/addon-mv3/rules.json +1 -1
  14. package/dist/autoconsent.cjs.js +17 -5
  15. package/dist/autoconsent.esm.js +17 -5
  16. package/dist/autoconsent.extra.cjs.js +17 -5
  17. package/dist/autoconsent.extra.esm.js +17 -5
  18. package/dist/autoconsent.playwright.js +17 -5
  19. package/dist/types/eval-snippets.d.ts +0 -2
  20. package/dist/types/heuristics.d.ts +1 -0
  21. package/docs/rule-syntax.md +32 -1
  22. package/lib/eval-snippets.ts +0 -3
  23. package/lib/heuristics.ts +18 -3
  24. package/package.json +1 -1
  25. package/rules/autoconsent/elsevier-pure.json +31 -0
  26. package/rules/autoconsent/facebook.json +21 -7
  27. package/rules/autoconsent/fullertonhotels.com.json +37 -0
  28. package/rules/autoconsent/geni.com.json +8 -5
  29. package/rules/autoconsent/remarkable.com.json +6 -27
  30. package/rules/autoconsent/unicourt.json +5 -5
  31. package/rules/compact-rules.json +1 -1
  32. package/rules/generated/auto_AU_flysaa.com_qsm.json +10 -9
  33. package/rules/generated/auto_DE_immobilien.sparkasse.de_zj7.json +10 -10
  34. package/rules/generated/auto_GB_www2.hm.com_0.json +15 -6
  35. package/rules/rules.json +1 -1
  36. package/tests/elsevier-pure.spec.ts +11 -0
  37. package/tests/fullertonhotels.com.spec.ts +6 -0
  38. package/tests/generated/auto_GB_www2.hm.com_0.spec.ts +16 -0
  39. package/tests-wtr/heuristics/get-actionable-popups.html +24 -0
  40. package/tests-wtr/heuristics/get-actionable-popups.ts +36 -0
  41. package/tests-wtr/heuristics/heuristics-utils.test.ts +43 -0
  42. package/rules/autoconsent/mediavine.json +0 -17
  43. package/rules/autoconsent/national-lottery-co-uk.json +0 -11
  44. package/rules/autoconsent/ouraring.json +0 -36
  45. package/rules/generated/auto_AU_discover.utas.edu.au_k2n.json +0 -37
  46. package/rules/generated/auto_AU_experts.deakin.edu.au_0kw.json +0 -40
  47. package/rules/generated/auto_AU_experts.griffith.edu.au_oi0.json +0 -37
  48. package/rules/generated/auto_AU_fullertonhotels.com_y46.json +0 -40
  49. package/rules/generated/auto_AU_profiles.uts.edu.au_ouv.json +0 -37
  50. package/rules/generated/auto_AU_scholars.latrobe.edu.au_li6.json +0 -40
  51. package/rules/generated/auto_CA_discover.research.utoronto.ca_vtf.json +0 -40
  52. package/rules/generated/auto_CA_remarkable.com_kt9.json +0 -40
  53. package/rules/generated/auto_DE_www2.hm.com_beo.json +0 -40
  54. package/rules/generated/auto_GB_profiles.ucl.ac.uk_lpo.json +0 -40
  55. package/tests/generated/auto_AU_discover.utas.edu.au_k2n.spec.ts +0 -6
  56. package/tests/generated/auto_AU_experts.deakin.edu.au_0kw.spec.ts +0 -6
  57. package/tests/generated/auto_AU_experts.griffith.edu.au_oi0.spec.ts +0 -6
  58. package/tests/generated/auto_AU_fullertonhotels.com_y46.spec.ts +0 -6
  59. package/tests/generated/auto_AU_profiles.uts.edu.au_ouv.spec.ts +0 -6
  60. package/tests/generated/auto_AU_scholars.latrobe.edu.au_li6.spec.ts +0 -6
  61. package/tests/generated/auto_CA_discover.research.utoronto.ca_vtf.spec.ts +0 -6
  62. package/tests/generated/auto_CA_remarkable.com_kt9.spec.ts +0 -2
  63. package/tests/generated/auto_DE_www2.hm.com_beo.spec.ts +0 -6
  64. package/tests/generated/auto_GB_profiles.ucl.ac.uk_lpo.spec.ts +0 -6
  65. package/tests/mediavine.spec.ts +0 -5
  66. package/tests/national-lottery.spec.ts +0 -5
  67. package/tests/ouraring.spec.ts +0 -3
@@ -9,30 +9,31 @@
9
9
  "frame": false,
10
10
  "urlPattern": "^https?://(www\\.)?flysaa\\.com/"
11
11
  },
12
- "prehideSelectors": [],
12
+ "prehideSelectors": ["#cookiesPortletDiv"],
13
13
  "detectCmp": [
14
14
  {
15
- "exists": "body > div:not([id]) > div#wrapper > div:nth-child(7)#cookiesPortletDiv > div#p_p_id_es_indra_ibe_saa_CookiesPortlet_ > section:nth-child(2)#portlet_es_indra_ibe_saa_CookiesPortlet > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > form:nth-child(2)#_es_indra_ibe_saa_CookiesPortlet_cookiesForm > fieldset:nth-child(3):not([id]) > div:nth-child(2)#Content > div:not([id]) > div:nth-child(4):not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(4):not([id])"
15
+ "exists": "#cookiesPortletDiv"
16
16
  }
17
17
  ],
18
18
  "detectPopup": [
19
19
  {
20
- "visible": "body > div:not([id]) > div#wrapper > div:nth-child(7)#cookiesPortletDiv > div#p_p_id_es_indra_ibe_saa_CookiesPortlet_ > section:nth-child(2)#portlet_es_indra_ibe_saa_CookiesPortlet > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > form:nth-child(2)#_es_indra_ibe_saa_CookiesPortlet_cookiesForm > fieldset:nth-child(3):not([id]) > div:nth-child(2)#Content > div:not([id]) > div:nth-child(4):not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(4):not([id])"
20
+ "visible": "#cookiesPortletDiv .cookie-buttons"
21
21
  }
22
22
  ],
23
- "optIn": [],
24
- "optOut": [
23
+ "optIn": [
25
24
  {
26
- "wait": 500
27
- },
25
+ "waitForThenClick": "#cookiesPortletDiv button[name='acceptAll']"
26
+ }
27
+ ],
28
+ "optOut": [
28
29
  {
29
- "waitForThenClick": "body > div:not([id]) > div#wrapper > div:nth-child(7)#cookiesPortletDiv > div#p_p_id_es_indra_ibe_saa_CookiesPortlet_ > section:nth-child(2)#portlet_es_indra_ibe_saa_CookiesPortlet > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > form:nth-child(2)#_es_indra_ibe_saa_CookiesPortlet_cookiesForm > fieldset:nth-child(3):not([id]) > div:nth-child(2)#Content > div:not([id]) > div:nth-child(4):not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(4):not([id])",
30
+ "waitForThenClick": "#cookiesPortletDiv button[aria-label='Only Mandatory']",
30
31
  "comment": "Only Mandatory"
31
32
  }
32
33
  ],
33
34
  "test": [
34
35
  {
35
- "waitForVisible": "body > div:not([id]) > div#wrapper > div:nth-child(7)#cookiesPortletDiv > div#p_p_id_es_indra_ibe_saa_CookiesPortlet_ > section:nth-child(2)#portlet_es_indra_ibe_saa_CookiesPortlet > div:not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > div:not([id]) > form:nth-child(2)#_es_indra_ibe_saa_CookiesPortlet_cookiesForm > fieldset:nth-child(3):not([id]) > div:nth-child(2)#Content > div:not([id]) > div:nth-child(4):not([id]) > div:nth-child(2):not([id]) > div:nth-child(2):not([id]) > button:nth-child(4):not([id])",
36
+ "waitForVisible": "#cookiesPortletDiv .cookie-buttons",
36
37
  "timeout": 1000,
37
38
  "check": "none"
38
39
  }
@@ -9,30 +9,30 @@
9
9
  "frame": false,
10
10
  "urlPattern": "^https?://(www\\.)?immobilien\\.sparkasse\\.de/"
11
11
  },
12
- "prehideSelectors": [],
12
+ "prehideSelectors": ["#tc-privacy-wrapper"],
13
13
  "detectCmp": [
14
14
  {
15
- "exists": "body > div#tc-privacy-wrapper > div#popin_tc_privacy > div:nth-child(2)#popin_tc_privacy_container_button > button:nth-child(2)#popin_tc_privacy_button_2"
15
+ "exists": "[data-testid=\"consentManager\"]"
16
16
  }
17
17
  ],
18
18
  "detectPopup": [
19
19
  {
20
- "visible": "body > div#tc-privacy-wrapper > div#popin_tc_privacy > div:nth-child(2)#popin_tc_privacy_container_button > button:nth-child(2)#popin_tc_privacy_button_2"
20
+ "visible": "[data-testid=\"consentManager\"]"
21
21
  }
22
22
  ],
23
- "optIn": [],
24
- "optOut": [
23
+ "optIn": [
25
24
  {
26
- "wait": 500
27
- },
25
+ "waitForThenClick": "[data-testid=\"privacyBanner-agreeAll\"]"
26
+ }
27
+ ],
28
+ "optOut": [
28
29
  {
29
- "waitForThenClick": "body > div#tc-privacy-wrapper > div#popin_tc_privacy > div:nth-child(2)#popin_tc_privacy_container_button > button:nth-child(2)#popin_tc_privacy_button_2",
30
- "comment": "zusätzliche Cookies ablehnen"
30
+ "waitForThenClick": "[data-testid=\"privacyBanner-rejectAll\"]"
31
31
  }
32
32
  ],
33
33
  "test": [
34
34
  {
35
- "waitForVisible": "body > div#tc-privacy-wrapper > div#popin_tc_privacy > div:nth-child(2)#popin_tc_privacy_container_button > button:nth-child(2)#popin_tc_privacy_button_2",
35
+ "waitForVisible": "[data-testid=\"consentManager\"]",
36
36
  "timeout": 1000,
37
37
  "check": "none"
38
38
  }
@@ -7,22 +7,31 @@
7
7
  "frame": false,
8
8
  "urlPattern": "^https?://(www\\.)?www2\\.hm\\.com/"
9
9
  },
10
- "prehideSelectors": [],
10
+ "prehideSelectors": ["dialog.cookie-consent-popup"],
11
11
  "detectCmp": [
12
12
  {
13
- "exists": "body:not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > button:nth-child(2)#banner-reject-btn"
13
+ "exists": "dialog.cookie-consent-popup"
14
14
  }
15
15
  ],
16
16
  "detectPopup": [
17
17
  {
18
- "visible": "body:not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > button:nth-child(2)#banner-reject-btn"
18
+ "visible": "dialog.cookie-consent-popup"
19
+ }
20
+ ],
21
+ "optIn": [
22
+ {
23
+ "waitForThenClick": "#banner-accept-btn"
19
24
  }
20
25
  ],
21
- "optIn": [],
22
26
  "optOut": [
23
27
  {
24
- "waitForThenClick": "body:not([id]) > div:not([id]) > div:nth-child(1):not([id]) > div:nth-child(2):not([id]) > div:not([id]) > div:nth-child(1):not([id]) > button:nth-child(2)#banner-reject-btn",
25
- "comment": "Only required cookies"
28
+ "if": { "exists": "#banner-reject-btn" },
29
+ "then": [{ "waitForThenClick": "#banner-reject-btn" }],
30
+ "else": [
31
+ { "waitForThenClick": "#banner-cookie-setting-btn" },
32
+ { "waitForVisible": "#settings-only-required-btn" },
33
+ { "waitForThenClick": "#settings-only-required-btn" }
34
+ ]
26
35
  }
27
36
  ]
28
37
  }