@duckduckgo/autoconsent 16.49.0 → 16.50.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 (72) hide show
  1. package/.github/workflows/release-labels.yml +2 -6
  2. package/CHANGELOG.md +41 -0
  3. package/dist/addon-firefox/background.bundle.js +4 -1
  4. package/dist/addon-firefox/compact-rules.json +1 -1
  5. package/dist/addon-firefox/content.bundle.js +20 -6
  6. package/dist/addon-firefox/manifest.json +1 -1
  7. package/dist/addon-firefox/rule-index.json +1 -1
  8. package/dist/addon-firefox/rules.json +1 -1
  9. package/dist/addon-mv3/background.bundle.js +4 -1
  10. package/dist/addon-mv3/compact-rules.json +1 -1
  11. package/dist/addon-mv3/content.bundle.js +20 -6
  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 +20 -6
  16. package/dist/autoconsent.esm.js +20 -6
  17. package/dist/autoconsent.playwright.js +20 -6
  18. package/dist/autoconsent.standalone.js +21 -7
  19. package/dist/types/eval-snippets.d.ts +2 -0
  20. package/lib/eval-snippets.ts +4 -0
  21. package/lib/heuristic-patterns.ts +16 -3
  22. package/package.json +1 -1
  23. package/rules/autoconsent/amazon-hiring.json +16 -0
  24. package/rules/autoconsent/avada-cookie-consent.json +43 -0
  25. package/rules/autoconsent/axeptio.json +17 -4
  26. package/rules/autoconsent/bigcrunch.json +39 -0
  27. package/rules/autoconsent/bricklink.json +33 -0
  28. package/rules/autoconsent/ceneo.json +9 -0
  29. package/rules/autoconsent/conjointly.json +43 -0
  30. package/rules/autoconsent/dhbbank.json +13 -0
  31. package/rules/autoconsent/ee-consent-notice.json +40 -0
  32. package/rules/autoconsent/fera-cookies.json +67 -0
  33. package/rules/autoconsent/la7-cmp.json +30 -0
  34. package/rules/autoconsent/laravel-cookie-consent.json +45 -0
  35. package/rules/autoconsent/legislation-gov-uk.json +43 -0
  36. package/rules/autoconsent/mackeeper.json +34 -0
  37. package/rules/autoconsent/ndl-go-jp.json +35 -0
  38. package/rules/autoconsent/paypal-us.json +3 -3
  39. package/rules/autoconsent/paypal.json +5 -2
  40. package/rules/autoconsent/texas-instruments.json +17 -0
  41. package/rules/autoconsent/thegrandyork.json +46 -0
  42. package/rules/autoconsent/thenounproject.json +61 -0
  43. package/rules/autoconsent/toyota.json +16 -5
  44. package/rules/autoconsent/uft-cookie-notice.json +15 -0
  45. package/rules/autoconsent/wbd-legal-terms.json +32 -0
  46. package/rules/compact-rules.json +1 -1
  47. package/rules/rule-index.json +1 -1
  48. package/rules/rules.json +1 -1
  49. package/tests/amazon-hiring.spec.ts +3 -0
  50. package/tests/avada-cookie-consent.spec.ts +9 -0
  51. package/tests/axeptio.spec.ts +8 -4
  52. package/tests/bigcrunch.spec.ts +16 -0
  53. package/tests/bricklink.spec.ts +3 -0
  54. package/tests/ceneo.spec.ts +3 -0
  55. package/tests/conjointly.spec.ts +3 -0
  56. package/tests/dhbbank.spec.ts +6 -0
  57. package/tests/ee-consent-notice.spec.ts +9 -0
  58. package/tests/fera-cookies.spec.ts +6 -0
  59. package/tests/la7-cmp.spec.ts +6 -0
  60. package/tests/laravel-cookie-consent.spec.ts +10 -0
  61. package/tests/legislation-gov-uk.spec.ts +3 -0
  62. package/tests/mackeeper.spec.ts +3 -0
  63. package/tests/ndl-go-jp.spec.ts +8 -0
  64. package/tests/paypal-us.spec.ts +2 -3
  65. package/tests/texas-instruments.spec.ts +3 -0
  66. package/tests/thegrandyork.spec.ts +3 -0
  67. package/tests/thenounproject.spec.ts +3 -0
  68. package/tests/uft-cookie-notice.spec.ts +3 -0
  69. package/tests/wbd-legal-terms.spec.ts +18 -0
  70. package/tests-wtr/heuristics/heuristics-utils.test.ts +55 -0
  71. package/rules/autoconsent/paypal-cookieprefs.json +0 -29
  72. package/tests/paypal-cookieprefs.spec.ts +0 -7
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "texas-instruments",
3
+ "prehideSelectors": ["#tiGDPRecModal,#tiGDPRcpPrefs"],
4
+ "detectCmp": [{ "exists": "#tiGDPRecModal #consent_pref_center" }],
5
+ "detectPopup": [{ "visible": "#tiGDPRecModal .privacy_prompt" }],
6
+ "optOut": [
7
+ { "click": "#consent_pref_center" },
8
+ { "waitForVisible": "#tiGDPRcpPrefs .privacy_prompt" },
9
+ {
10
+ "if": { "exists": "#tiGDPRcpPrefs input.cookie-custom-checkbox:checked" },
11
+ "then": [{ "click": "#tiGDPRcpPrefs input.cookie-custom-checkbox:checked", "all": true }]
12
+ },
13
+ { "waitForThenClick": "#preferences_prompt_submit" }
14
+ ],
15
+ "optIn": [{ "waitForThenClick": "#consent_prompt_submit" }],
16
+ "test": [{ "cookieContains": "c1:0%7Cc3:0%7Cc6:0%7Cc7:0" }]
17
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "thegrandyork",
3
+ "runContext": {
4
+ "urlPattern": "^https?://(www\\.)?thegrandyork\\.co\\.uk/"
5
+ },
6
+ "prehideSelectors": ["#user-consent"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": "#user-consent .page.main button.manage"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": "#user-consent .page.main"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": "#user-consent .page.main button.acceptall"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "waitForThenClick": "#user-consent .page.main button.manage"
25
+ },
26
+ {
27
+ "waitForVisible": "#user-consent .page.secondary"
28
+ },
29
+ {
30
+ "click": "#user-consent .page.secondary input[type=checkbox]:checked:not([disabled])",
31
+ "all": true,
32
+ "optional": true
33
+ },
34
+ {
35
+ "click": "#user-consent .page.secondary button.save"
36
+ }
37
+ ],
38
+ "test": [
39
+ {
40
+ "wait": 500
41
+ },
42
+ {
43
+ "cookieContains": "\"marketing\":\"denied\""
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "thenounproject",
3
+ "vendorUrl": "https://thenounproject.com/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(\\w+\\.)?thenounproject\\.com/"
6
+ },
7
+ "prehideSelectors": ["[data-callback=\"accounts/hide-banner/CookiesBanner\"]"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "[data-callback=\"accounts/hide-banner/CookiesBanner\"] button[class*=\"ManageLink\"]"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "[data-callback=\"accounts/hide-banner/CookiesBanner\"] button[class*=\"ManageLink\"]",
16
+ "check": "any"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": "[data-callback=\"accounts/hide-banner/CookiesBanner\"] button:not([class*=\"ManageLink\"])"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "waitForThenClick": "[data-callback=\"accounts/hide-banner/CookiesBanner\"] button[class*=\"ManageLink\"]"
27
+ },
28
+ {
29
+ "any": [
30
+ {
31
+ "waitForVisible": "[data-testid=\"modal-body-content\"] [class*=\"IndividualBox\"] input[type=\"checkbox\"]",
32
+ "timeout": 2000,
33
+ "check": "any"
34
+ },
35
+ {
36
+ "click": "[data-callback=\"accounts/hide-banner/CookiesBanner\"] button[class*=\"ManageLink\"]"
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "waitForVisible": "[data-testid=\"modal-body-content\"] [class*=\"IndividualBox\"] input[type=\"checkbox\"]",
42
+ "check": "any"
43
+ },
44
+ {
45
+ "click": "[data-testid=\"modal-body-content\"] [class*=\"IndividualBox\"] input[type=\"checkbox\"][aria-disabled=\"false\"]:checked",
46
+ "all": true,
47
+ "optional": true
48
+ },
49
+ {
50
+ "waitForThenClick": "[data-testid=\"modal-body-content\"] [class*=\"Footer\"] button"
51
+ }
52
+ ],
53
+ "test": [
54
+ {
55
+ "cookieContains": "%22analytics%22%3Afalse"
56
+ },
57
+ {
58
+ "cookieContains": "%22advertising%22%3Afalse"
59
+ }
60
+ ]
61
+ }
@@ -9,27 +9,38 @@
9
9
  "prehideSelectors": ["#cookie-banner.visible"],
10
10
  "detectCmp": [
11
11
  {
12
- "exists": "#cookie-banner.visible .cookie-banner__container .cookie-banner__accept"
12
+ "exists": "#cookie-banner .cookie-banner__container [data-cookie-preferences-button]"
13
13
  }
14
14
  ],
15
15
  "detectPopup": [
16
16
  {
17
- "visible": "#cookie-banner.visible .cookie-banner__container .cookie-banner__accept"
17
+ "visible": "#cookie-banner.visible .cookie-banner__container"
18
18
  }
19
19
  ],
20
20
  "optIn": [
21
21
  {
22
- "waitForThenClick": "#cookie-banner.visible .cookie-banner__container .cookie-banner__accept"
22
+ "waitForThenClick": "#cookie-banner.visible .cookie-banner__dismiss"
23
23
  }
24
24
  ],
25
25
  "optOut": [
26
26
  {
27
- "waitForThenClick": "#cookie-banner.visible .cookie-banner__container .cookie-banner__reject"
27
+ "waitForThenClick": "#cookie-banner.visible [data-cookie-preferences-button]"
28
+ },
29
+ {
30
+ "waitForVisible": "#ensModalWrapper #ensSave"
31
+ },
32
+ {
33
+ "click": "#ensModalWrapper .ensCheckbox:checked:not(:disabled):not(#EssentialCookiesSlide)",
34
+ "all": true,
35
+ "optional": true
36
+ },
37
+ {
38
+ "waitForThenClick": "#ensModalWrapper #ensSave"
28
39
  }
29
40
  ],
30
41
  "test": [
31
42
  {
32
- "cookieContains": "TOYOTANATIONAL_ENSIGHTEN_PRIVACY_TargetingCookies"
43
+ "cookieContains": "ENSIGHTEN_PRIVACY_TargetingCookies=0"
33
44
  }
34
45
  ]
35
46
  }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "uft-cookie-notice",
3
+ "vendorUrl": "https://unknown",
4
+ "intermediate": false,
5
+ "prehideSelectors": ["#politique_confidentialite"],
6
+ "detectCmp": [{ "exists": "#politique_confidentialite #cookies_settings" }],
7
+ "detectPopup": [{ "visible": "#politique_confidentialite" }],
8
+ "optIn": [{ "waitForThenClick": "#politique_confidentialite #cookies_accept" }],
9
+ "optOut": [
10
+ { "click": "#politique_confidentialite #cookies_settings" },
11
+ { "waitForThenClick": "#cookie_settings a.refuse" },
12
+ { "waitForVisible": "#politique_confidentialite", "check": "none" }
13
+ ],
14
+ "test": [{ "wait": 1000 }, { "cookieContains": "UFT_cookie_notice_accepted=%5B%5D" }]
15
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "wbd-legal-terms",
3
+ "vendorUrl": "https://www.wbd.com/",
4
+ "comment": "Terms-and-cookies notice with only an Agree button. It is a modal <dialog>, so hiding it with CSS leaves the page inert; close it without submitting the form instead.",
5
+ "cosmetic": true,
6
+ "minimumRuleStepVersion": 2,
7
+ "detectCmp": [
8
+ {
9
+ "exists": "dialog#ltp-dialog"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": "dialog#ltp-dialog[open]"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": "#ltp-submit-btn"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "eval": "EVAL_WBD_LTP_CLOSE"
25
+ },
26
+ {
27
+ "removeClass": "is-NoScroll",
28
+ "selector": "body",
29
+ "optional": true
30
+ }
31
+ ]
32
+ }