@duckduckgo/autoconsent 7.1.0 → 8.1.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 (91) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/Jenkinsfile +20 -37
  3. package/data/coverage.json +507 -531
  4. package/dist/addon-firefox/background.bundle.js +1 -0
  5. package/dist/addon-firefox/content.bundle.js +12 -15
  6. package/dist/addon-firefox/manifest.json +1 -1
  7. package/dist/addon-firefox/rules.json +127 -184
  8. package/dist/addon-mv3/background.bundle.js +1 -0
  9. package/dist/addon-mv3/content.bundle.js +12 -15
  10. package/dist/addon-mv3/manifest.json +1 -1
  11. package/dist/addon-mv3/rules.json +127 -184
  12. package/dist/autoconsent.cjs.js +12 -15
  13. package/dist/autoconsent.esm.js +12 -15
  14. package/dist/autoconsent.playwright.js +1 -1
  15. package/lib/cmps/cookiebot.ts +1 -4
  16. package/lib/cmps/evidon.ts +1 -1
  17. package/lib/cmps/trustarc-top.ts +1 -1
  18. package/lib/eval-snippets.ts +1 -0
  19. package/lib/rule-executors.ts +4 -4
  20. package/lib/rules.ts +1 -6
  21. package/lib/utils.ts +3 -5
  22. package/lib/web.ts +1 -1
  23. package/package.json +3 -2
  24. package/playwright/runner.ts +1 -0
  25. package/playwright.config.ts +0 -2
  26. package/readme.md +37 -28
  27. package/rules/autoconsent/1password-com.json +1 -1
  28. package/rules/autoconsent/agolde-com.json +1 -1
  29. package/rules/autoconsent/altium-com.json +1 -1
  30. package/rules/autoconsent/aquasana-com.json +1 -1
  31. package/rules/autoconsent/athlinks-com.json +1 -1
  32. package/rules/autoconsent/ausopen.json +1 -1
  33. package/rules/autoconsent/baden-wuerttemberg-de.json +1 -1
  34. package/rules/autoconsent/bbb.json +1 -1
  35. package/rules/autoconsent/burpee-com.json +1 -1
  36. package/rules/autoconsent/cc-banner.json +1 -1
  37. package/rules/autoconsent/clustrmaps-com.json +1 -1
  38. package/rules/autoconsent/complianz-notice.json +1 -1
  39. package/rules/autoconsent/cookie-law-info.json +1 -1
  40. package/rules/autoconsent/cookie-notice.json +1 -1
  41. package/rules/autoconsent/cookieinformation.json +1 -1
  42. package/rules/autoconsent/cookieyes.json +1 -1
  43. package/rules/autoconsent/crossfit-com.json +1 -1
  44. package/rules/autoconsent/dailymotion-us.json +1 -1
  45. package/rules/autoconsent/delta-com.json +1 -1
  46. package/rules/autoconsent/dsgvo.json +1 -1
  47. package/rules/autoconsent/eu-cookie-compliance.json +1 -1
  48. package/rules/autoconsent/eu-cookie-law.json +1 -1
  49. package/rules/autoconsent/geeks-for-geeks.json +1 -1
  50. package/rules/autoconsent/generic-cosmetic.json +1 -1
  51. package/rules/autoconsent/hema-com.json +21 -0
  52. package/rules/autoconsent/hl-co-uk.json +1 -1
  53. package/rules/autoconsent/indeed-com.json +1 -1
  54. package/rules/autoconsent/ing-de.json +18 -0
  55. package/rules/autoconsent/itopvpn-com.json +1 -1
  56. package/rules/autoconsent/jquery-cookiebar.json +1 -1
  57. package/rules/autoconsent/macpaw-com.json +1 -1
  58. package/rules/autoconsent/marksandspencer.json +1 -1
  59. package/rules/autoconsent/midway-usa.json +1 -1
  60. package/rules/autoconsent/moove.json +1 -1
  61. package/rules/autoconsent/nba-com.json +1 -1
  62. package/rules/autoconsent/netflix-de.json +1 -1
  63. package/rules/autoconsent/notice-cookie.json +1 -1
  64. package/rules/autoconsent/nrk-no.json +1 -1
  65. package/rules/autoconsent/osano.json +1 -1
  66. package/rules/autoconsent/pinetools-com.json +1 -1
  67. package/rules/autoconsent/pmc-cmp.json +1 -1
  68. package/rules/autoconsent/pornhub.json +1 -1
  69. package/rules/autoconsent/pornpics.json +1 -1
  70. package/rules/autoconsent/primebox.json +1 -1
  71. package/rules/autoconsent/samsung-com.json +1 -1
  72. package/rules/autoconsent/similarweb-com.json +1 -1
  73. package/rules/autoconsent/takealot-com.json +1 -1
  74. package/rules/autoconsent/tealium.json +2 -2
  75. package/rules/autoconsent/testcmp-cosmetic.json +1 -1
  76. package/rules/autoconsent/tidbits-com.json +1 -1
  77. package/rules/autoconsent/tractor-supply.json +1 -1
  78. package/rules/autoconsent/trader-joes-com.json +1 -1
  79. package/rules/autoconsent/true-car.json +1 -1
  80. package/rules/autoconsent/tumblr-com.json +1 -1
  81. package/rules/autoconsent/twitch.json +1 -1
  82. package/rules/autoconsent/uk-cookie-consent.json +1 -1
  83. package/rules/autoconsent/urbanarmorgear-com.json +1 -1
  84. package/rules/autoconsent/whitepages.json +1 -1
  85. package/rules/autoconsent/wpcc.json +1 -1
  86. package/rules/autoconsent/xhamster-us.json +1 -1
  87. package/rules/autoconsent/xnxx-com.json +1 -1
  88. package/rules/autoconsent/youporn.json +1 -1
  89. package/rules/rules.json +127 -184
  90. package/tests/_sample-test.spec.ts +16 -0
  91. package/tests/hema.spec.ts +7 -0
@@ -12,7 +12,7 @@
12
12
  { "click": ".cookie-bar .cookie-bar__btn" }
13
13
  ],
14
14
  "optOut": [
15
- { "hide": [".cookie-bar"] }
15
+ { "hide": ".cookie-bar" }
16
16
  ],
17
17
  "test": [
18
18
  {
@@ -8,6 +8,6 @@
8
8
  { "click": "button[data-banner-close=\"cookies\"]" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["div[data-banner=\"cookies\"]"] }
11
+ { "hide": "div[data-banner=\"cookies\"]" }
12
12
  ]
13
13
  }
@@ -3,6 +3,6 @@
3
3
  "cosmetic": true,
4
4
  "detectCmp": [{ "exists": ".navigation-cookiebbanner" }],
5
5
  "detectPopup": [{ "visible": ".navigation-cookiebbanner" }],
6
- "optOut": [{ "hide": [".navigation-cookiebbanner"]}],
6
+ "optOut": [{ "hide": ".navigation-cookiebbanner"}],
7
7
  "optIn": [{ "click": ".navigation-cookiebbanner__submit"}]
8
8
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ["div[aria-label=\"Cookie Policy Banner\"]"] }],
9
9
  "detectPopup": [{ "visible": "#cookie-container" }],
10
10
  "optIn": [{ "click": "button#cookie-btn" }],
11
- "optOut": [{ "hide": ["div[aria-label=\"Cookie Policy Banner\"]"] }]
11
+ "optOut": [{ "hide": "div[aria-label=\"Cookie Policy Banner\"]" }]
12
12
  }
@@ -18,7 +18,7 @@
18
18
  { "click": ".moove-gdpr-modal-save-settings" }
19
19
  ],
20
20
  "else": [
21
- { "hide": ["#moove_gdpr_cookie_info_bar"] }
21
+ { "hide": "#moove_gdpr_cookie_info_bar" }
22
22
  ]
23
23
  }
24
24
  ],
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "#onetrust-banner-sdk" }],
9
9
  "detectPopup": [{ "visible": "#onetrust-banner-sdk" }],
10
10
  "optIn": [{ "click": "#onetrust-accept-btn-handler" }],
11
- "optOut": [{ "hide": ["#onetrust-banner-sdk"]}]
11
+ "optOut": [{ "hide": "#onetrust-banner-sdk"}]
12
12
  }
@@ -3,5 +3,5 @@
3
3
  "detectCmp": [{ "exists": "#cookie-disclosure" }],
4
4
  "detectPopup": [{ "visible": ".cookie-disclosure-message", "check": "any" }],
5
5
  "optIn": [{ "click": ".btn-accept" }],
6
- "optOut": [{"hide": ["#cookie-disclosure"]}, {"click": ".btn-reject"}]
6
+ "optOut": [{"hide": "#cookie-disclosure"}, {"click": ".btn-reject"}]
7
7
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".notice--cookie" }],
6
6
  "detectPopup": [{ "visible": ".notice--cookie" }],
7
7
  "optIn": [{ "click": ".button--notice" }],
8
- "optOut": [{ "hide": [".notice--cookie"] }]
8
+ "optOut": [{ "hide": ".notice--cookie" }]
9
9
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".nrk-masthead__info-banner--cookie" }],
6
6
  "detectPopup": [{ "exists": ".nrk-masthead__info-banner--cookie" }],
7
7
  "optIn": [{ "click": "div.nrk-masthead__info-banner--cookie button > span:has(+ svg.nrk-close)" }],
8
- "optOut": [{ "hide": [".nrk-masthead__info-banner--cookie"] }]
8
+ "optOut": [{ "hide": ".nrk-masthead__info-banner--cookie" }]
9
9
  }
@@ -9,6 +9,6 @@
9
9
  "optional": true
10
10
  }],
11
11
  "optOut": [
12
- { "hide": [".osano-cm-window"] }
12
+ { "hide": ".osano-cm-window" }
13
13
  ]
14
14
  }
@@ -8,6 +8,6 @@
8
8
  { "click": "#aviso_cookies .a_boton_cerrar" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["#aviso_cookies"] }
11
+ { "hide": "#aviso_cookies" }
12
12
  ]
13
13
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#pmc-pp-tou--notice" }],
6
6
  "detectPopup": [{ "visible": "#pmc-pp-tou--notice" }],
7
7
  "optIn": [{ "click": "span.pmc-pp-tou--notice-close-btn" }],
8
- "optOut": [{ "hide": ["#pmc-pp-tou--notice"] }]
8
+ "optOut": [{ "hide": "#pmc-pp-tou--notice" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ".cookiesBanner" }],
9
9
  "detectPopup": [{ "visible": ".cookiesBanner" }],
10
10
  "optIn": [{ "click": ".cookiesBanner .okButton" }],
11
- "optOut": [{ "hide": [".cookiesBanner"] }]
11
+ "optOut": [{ "hide": ".cookiesBanner" }]
12
12
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#cookie-contract" }],
6
6
  "detectPopup": [{ "visible": "#cookie-contract" }],
7
7
  "optIn": [{ "click": "#cookie-contract .icon-cross" }],
8
- "optOut": [{ "hide": ["#cookie-contract"] }]
8
+ "optOut": [{ "hide": "#cookie-contract" }]
9
9
  }
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "optOut": [
13
13
  { "click": "#cookie-bar .cb-disable", "optional": true },
14
- { "hide": ["#cookie-bar"] }
14
+ { "hide": "#cookie-bar" }
15
15
  ],
16
16
  "test": [
17
17
  { "eval": "EVAL_PRIMEBOX_0" }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "div.cookie-bar" }],
9
9
  "detectPopup": [{ "visible": "div.cookie-bar" }],
10
10
  "optIn": [{ "click": "div.cookie-bar__manage > a" }],
11
- "optOut": [{ "hide": ["div.cookie-bar"] }]
11
+ "optOut": [{ "hide": "div.cookie-bar" }]
12
12
  }
@@ -8,6 +8,6 @@
8
8
  { "click": "button.app-cookies-notification__dismiss" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": [".app-layout .app-cookies-notification"] }
11
+ { "hide": ".app-layout .app-cookies-notification" }
12
12
  ]
13
13
  }
@@ -8,7 +8,7 @@
8
8
  { "click": "button[class*=\"cookies-banner-module_dismiss-button_\"]" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["div[class^=\"cookies-banner-module_\"]"] },
11
+ { "hide": "div[class^=\"cookies-banner-module_\"]" },
12
12
  {
13
13
  "if": { "exists": "div[class^=\"cookies-banner-module_small-cookie-banner_\"]" },
14
14
  "then": [{ "eval": "EVAL_TAKEALOT_0"}],
@@ -11,7 +11,7 @@
11
11
  "optOut": [
12
12
  { "eval": "EVAL_TEALIUM_1" },
13
13
  { "eval": "EVAL_TEALIUM_DONOTSELL" },
14
- { "hide": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs"] },
14
+ { "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs" },
15
15
  {
16
16
  "waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies",
17
17
  "timeout": 1000,
@@ -19,7 +19,7 @@
19
19
  }
20
20
  ],
21
21
  "optIn": [
22
- { "hide": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs"] },
22
+ { "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs" },
23
23
  { "eval": "EVAL_TEALIUM_2" }
24
24
  ],
25
25
  "test": [
@@ -9,7 +9,7 @@
9
9
  { "click": "#accept-all" }
10
10
  ],
11
11
  "optOut": [
12
- { "hide": ["#privacy-test-page-cmp-test-banner"] }
12
+ { "hide": "#privacy-test-page-cmp-test-banner" }
13
13
  ],
14
14
  "test": [
15
15
  { "wait": 500 },
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#eu_cookie_law_widget-2" }],
6
6
  "detectPopup": [{ "visible": "#eu_cookie_law_widget-2" }],
7
7
  "optIn": [{ "click": "#eu-cookie-law form > input.accept" }],
8
- "optOut": [{ "hide": ["#eu_cookie_law_widget-2"] }]
8
+ "optOut": [{ "hide": "#eu_cookie_law_widget-2" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ".tsc-cookie-banner" }],
9
9
  "detectPopup": [{ "visible": ".tsc-cookie-banner" }],
10
10
  "optIn": [{ "click": "#cookie-banner-cancel" }],
11
- "optOut": [{ "hide": [".tsc-cookie-banner"] }]
11
+ "optOut": [{ "hide": ".tsc-cookie-banner" }]
12
12
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "div.aem-page > div[class^=\"CookiesAlert_cookiesAlert__\"]" }],
6
6
  "detectPopup": [{ "visible": "div.aem-page > div[class^=\"CookiesAlert_cookiesAlert__\"]" }],
7
7
  "optIn": [{"click": "div[class^=\"CookiesAlert_cookiesAlert__container__\"] button" }],
8
- "optOut": [{ "hide": ["div.aem-page > div[class^=\"CookiesAlert_cookiesAlert__\"]"] }]
8
+ "optOut": [{ "hide": "div.aem-page > div[class^=\"CookiesAlert_cookiesAlert__\"]" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "div[aria-labelledby=\"cookie-banner-heading\"]" }],
9
9
  "detectPopup": [{ "visible": "div[aria-labelledby=\"cookie-banner-heading\"]" }],
10
10
  "optIn": [{ "click": "div[aria-labelledby=\"cookie-banner-heading\"] > button[aria-label=\"Close\"]" }],
11
- "optOut": [{ "hide": ["div[aria-labelledby=\"cookie-banner-heading\"]"] }]
11
+ "optOut": [{ "hide": "div[aria-labelledby=\"cookie-banner-heading\"]" }]
12
12
  }
@@ -6,5 +6,5 @@
6
6
  "detectPopup": [{ "visible": "#cmp-app-container" }],
7
7
  "optIn":
8
8
  [{"click": "#tumblr #cmp-app-container div.components-modal__frame > iframe > html body > div > div > div.cmp__dialog-footer > div > button.components-button.white-space-normal.is-primary" }],
9
- "optOut": [{ "hide": ["#cmp-app-container"] }]
9
+ "optOut": [{ "hide": "#cmp-app-container" }]
10
10
  }
@@ -8,7 +8,7 @@
8
8
  "detectPopup": [{ "visible": ".consent-banner .consent-banner__content--gdpr-v2" }],
9
9
  "optIn": [{ "click": "button[data-a-target=\"consent-banner-accept\"]" }],
10
10
  "optOut": [
11
- { "hide": ["div:has(> .consent-banner .consent-banner__content--gdpr-v2)"]},
11
+ { "hide": "div:has(> .consent-banner .consent-banner__content--gdpr-v2)"},
12
12
  { "click": "button[data-a-target=\"consent-banner-manage-preferences\"]" },
13
13
  { "waitFor": "input[type=checkbox][data-a-target=tw-checkbox]" },
14
14
  { "click": "input[type=checkbox][data-a-target=tw-checkbox][checked]:not([disabled])", "all": true, "optional": true },
@@ -8,7 +8,7 @@
8
8
  { "click": "#catapultCookie" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["#catapult-cookie-bar"] }
11
+ { "hide": "#catapult-cookie-bar" }
12
12
  ],
13
13
  "test": [
14
14
  { "eval": "EVAL_UK_COOKIE_CONSENT_0" }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "div[class^=\"Layout__CookieBannerContainer-\"]" }],
6
6
  "detectPopup": [{ "visible": "div[class^=\"Layout__CookieBannerContainer-\"]" }],
7
7
  "optIn": [{"click": "button[class^=\"CookieBanner__AcceptButton\"]" }],
8
- "optOut": [{ "hide": ["div[class^=\"Layout__CookieBannerContainer-\"]"] }]
8
+ "optOut": [{ "hide": "div[class^=\"Layout__CookieBannerContainer-\"]" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ".cookie-wrapper" }],
9
9
  "detectPopup": [{ "visible": ".cookie-overlay" }],
10
10
  "optIn": [{ "click": "button[aria-label=\"Got it\"]" }],
11
- "optOut": [{ "hide": [".cookie-wrapper"] }]
11
+ "optOut": [{ "hide": ".cookie-wrapper" }]
12
12
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".wpcc-container" }],
6
6
  "detectPopup": [{ "exists": ".wpcc-container .wpcc-message" }],
7
7
  "optIn": [{ "click": ".wpcc-compliance .wpcc-btn" }],
8
- "optOut": [{ "hide": [".wpcc-container"] }]
8
+ "optOut": [{ "hide": ".wpcc-container" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ".cookie-announce" }],
9
9
  "detectPopup": [{ "visible": ".cookie-announce .announce-text" }],
10
10
  "optIn": [{ "click": ".cookie-announce button.xh-button" }],
11
- "optOut": [{ "hide": [".cookie-announce"] }]
11
+ "optOut": [{ "hide": ".cookie-announce" }]
12
12
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#cookies-use-alert" }],
6
6
  "detectPopup": [{ "visible": "#cookies-use-alert" }],
7
7
  "optIn": [{ "click": "#cookies-use-alert .close" }],
8
- "optOut": [{ "hide": ["#cookies-use-alert"] }]
8
+ "optOut": [{ "hide": "#cookies-use-alert" }]
9
9
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".euCookieModal" }],
6
6
  "detectPopup": [{ "exists": ".euCookieModal, #js_euCookieModal" }],
7
7
  "optIn": [{ "click": "button[name=\"user_acceptCookie\"]" }],
8
- "optOut": [{ "hide": [".euCookieModal"] }]
8
+ "optOut": [{ "hide": ".euCookieModal" }]
9
9
  }