@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
@@ -40,6 +40,7 @@ export declare const snippets: {
40
40
  EVAL_COOKIEFIRST_1: () => boolean;
41
41
  EVAL_COOKIEINFORMATION_0: () => any;
42
42
  EVAL_COOKIEINFORMATION_1: () => any;
43
+ EVAL_EE_CONSENT_DECLINE_0: () => boolean;
43
44
  EVAL_ETSY_0: () => boolean;
44
45
  EVAL_ETSY_1: () => any;
45
46
  EVAL_EZOIC_0: () => any;
@@ -87,5 +88,6 @@ export declare const snippets: {
87
88
  EVAL_USERCENTRICS_API_6: () => boolean;
88
89
  EVAL_USERCENTRICS_BUTTON_0: () => any;
89
90
  EVAL_WAITROSE_0: () => boolean;
91
+ EVAL_WBD_LTP_CLOSE: () => any;
90
92
  };
91
93
  export declare function getFunctionBody(snippetFunc: () => any): string;
@@ -148,6 +148,9 @@ export const snippets = {
148
148
  .forEach((i) => i.getAttribute('aria-checked') === 'true' && i.click()) || true,
149
149
  EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
150
150
  EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
151
+ // turn the single-button form into a decline submission, same fields as the CMP's own decline form
152
+ EVAL_EE_CONSENT_DECLINE_0: () =>
153
+ document.querySelectorAll('#cookieConsentFormAccept input[name^="ee:cookies_"]').forEach((i) => (i.value = 'n')) || true,
151
154
  EVAL_ETSY_0: () =>
152
155
  document.querySelectorAll('.gdpr-overlay-body input').forEach((toggle) => {
153
156
  toggle.checked = false;
@@ -264,6 +267,7 @@ export const snippets = {
264
267
  EVAL_USERCENTRICS_BUTTON_0: () =>
265
268
  JSON.parse(localStorage.getItem('usercentrics')).consents.every((c) => c.isEssential || !c.consentStatus),
266
269
  EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll('label[id$=cookies-deny-label]')).forEach((e) => e.click()) || true,
270
+ EVAL_WBD_LTP_CLOSE: () => document.querySelector('dialog#ltp-dialog').close() || true,
267
271
  };
268
272
 
269
273
  export function getFunctionBody(snippetFunc: () => any) {
@@ -7,7 +7,8 @@ export const DETECT_PATTERNS = [
7
7
  /only necessary cookies/gi, // "only necessary" is probably too broad
8
8
  /(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
9
9
  /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi,
10
- /we (?:use|serve)(?: optional| essential)? cookies/gi,
10
+ // a single qualifier is common: "optional", "essential", "necessary", "analytics", ...
11
+ /we (?:use|serve)(?: \w+)? cookies/gi,
11
12
  /we are using cookies/gi,
12
13
  /use of cookies/gi,
13
14
  /website uses cookies to enhance your browsing experience/gi,
@@ -165,6 +166,10 @@ export const DETECT_PATTERNS = [
165
166
 
166
167
  // Italian (IT)
167
168
  /usiamo.{0,20}cookie/gi,
169
+
170
+ // Japanese (JA)
171
+ // e.g. "当サイトはCookieを使用しています", "クッキー(Cookie)を利用しています"
172
+ /(?:cookie|クッキー).{0,10}を(?:使用|利用)/gi,
168
173
  ];
169
174
 
170
175
  const REJECT_PATTERNS_ENGLISH = [
@@ -185,8 +190,8 @@ const REJECT_PATTERNS_ENGLISH = [
185
190
  /^\s*(i\s+)?(want\s+to\s+)?only\s+(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
186
191
  /^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
187
192
 
188
- // e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
189
- /do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
193
+ // e.g. "do not sell or share my personal information", "do not share my personal information", "opt out of sale ..." (CCPA)
194
+ /do\s+not\s+sell|do\s+not\s+share\s+my\s+(personal\s+)?(information|info|data)|opt\s+out\s+of\s+sale/is,
190
195
 
191
196
  // e.g. "opt-out of sale/share or targeted advertising", "opt-out of advertising/social media cookies"
192
197
  /^opt[ -]?out of /is,
@@ -390,6 +395,13 @@ const REJECT_PATTERNS_TURKISH = ['reddet', 'çerezleri reddet'];
390
395
 
391
396
  const REJECT_PATTERNS_INDONESIAN = ['tolak cookie'];
392
397
 
398
+ const REJECT_PATTERNS_JAPANESE = [
399
+ // e.g. "拒否", "すべて拒否", "全て拒否する", "cookieを拒否"
400
+ /^(すべて|全て)?\s?(の)?(cookie|クッキー)?\s?(を)?拒否(する)?$/i,
401
+ '同意しない',
402
+ '同意しません',
403
+ ];
404
+
393
405
  /**
394
406
  * @type {Array<string|RegExp>}
395
407
  */
@@ -411,6 +423,7 @@ export const REJECT_PATTERNS = [
411
423
  ...REJECT_PATTERNS_RUSSIAN,
412
424
  ...REJECT_PATTERNS_TURKISH,
413
425
  ...REJECT_PATTERNS_INDONESIAN,
426
+ ...REJECT_PATTERNS_JAPANESE,
414
427
  ];
415
428
 
416
429
  export const BUTTON_NEVER_MATCH_PATTERNS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "16.49.0",
3
+ "version": "16.50.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "amazon-hiring",
3
+ "vendorUrl": "https://hiring.amazon.com/",
4
+ "detectCmp": [{ "exists": "[data-test-id=\"consentModal\"] [data-test-id=\"consentBtn\"]" }],
5
+ "detectPopup": [{ "visible": "[data-test-id=\"consentModal\"] [data-test-id=\"consentBtn\"]" }],
6
+ "optIn": [{ "waitForThenClick": "[data-test-id=\"consentModal\"] [data-test-id=\"consentBtn\"]" }],
7
+ "optOut": [
8
+ { "click": "[data-test-id=\"consentModal\"] button[aria-label=\"Continue without accepting cookies\"]" },
9
+ { "waitForVisible": "[data-test-id=\"consentModal\"] [data-test-id=\"consentBtn\"]", "check": "none", "timeout": 2000 },
10
+ {
11
+ "if": { "exists": "[data-test-id=\"consentModal\"] button[aria-label=\"Close cookie consent card popup\"]" },
12
+ "then": [{ "click": "[data-test-id=\"consentModal\"] button[aria-label=\"Close cookie consent card popup\"]" }]
13
+ },
14
+ { "waitForVisible": "[data-test-id=\"consentModal\"]", "check": "none", "timeout": 2000 }
15
+ ]
16
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "avada-cookie-consent",
3
+ "vendorUrl": "https://apps.shopify.com/avada-cookie-bar",
4
+ "prehideSelectors": [".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_Container"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": ".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_BtnDeny"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": ".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_BtnDeny",
13
+ "check": "any"
14
+ }
15
+ ],
16
+ "optIn": [
17
+ {
18
+ "waitForThenClick": ".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_BtnAgree"
19
+ }
20
+ ],
21
+ "optOut": [
22
+ {
23
+ "waitForThenClick": ".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_BtnDeny"
24
+ },
25
+ {
26
+ "any": [
27
+ {
28
+ "waitForVisible": ".Avada-CookiesBar__OuterWrapper .Avada-CookiesBar_Container",
29
+ "check": "none",
30
+ "timeout": 1000
31
+ },
32
+ {
33
+ "waitForThenClick": ".Avada-CookiesBar-Preferences__PopUp .Avada-CookiesBar_BtnDeny"
34
+ }
35
+ ]
36
+ }
37
+ ],
38
+ "test": [
39
+ {
40
+ "cookieContains": "\"analytics\":false,\"marketing\":false"
41
+ }
42
+ ]
43
+ }
@@ -32,14 +32,27 @@
32
32
  {
33
33
  "if": { "exists": ".axeptio_mount .needsclick" },
34
34
  "then": [
35
- { "waitForVisible": [".axeptio_mount .needsclick", "button#axeptio_btn_dismiss,button.ax-discardButton"] },
35
+ {
36
+ "waitForVisible": [
37
+ ".axeptio_mount .needsclick",
38
+ "button#axeptio_btn_dismiss,button.ax-discardButton,button#axeptio_btn_close"
39
+ ]
40
+ },
36
41
  { "wait": 300 },
37
- { "click": [".axeptio_mount .needsclick", "button#axeptio_btn_dismiss,button.ax-discardButton"] }
42
+ {
43
+ "if": { "exists": [".axeptio_mount .needsclick", "button#axeptio_btn_dismiss,button.ax-discardButton"] },
44
+ "then": [{ "click": [".axeptio_mount .needsclick", "button#axeptio_btn_dismiss,button.ax-discardButton"] }],
45
+ "else": [{ "click": [".axeptio_mount .needsclick", "button#axeptio_btn_close"] }]
46
+ }
38
47
  ],
39
48
  "else": [
40
- { "waitForVisible": "button#axeptio_btn_dismiss,button.ax-discardButton" },
49
+ { "waitForVisible": "button#axeptio_btn_dismiss,button.ax-discardButton,button#axeptio_btn_close" },
41
50
  { "wait": 300 },
42
- { "click": "button#axeptio_btn_dismiss,button.ax-discardButton" }
51
+ {
52
+ "if": { "exists": "button#axeptio_btn_dismiss,button.ax-discardButton" },
53
+ "then": [{ "click": "button#axeptio_btn_dismiss,button.ax-discardButton" }],
54
+ "else": [{ "click": "button#axeptio_btn_close" }]
55
+ }
43
56
  ]
44
57
  }
45
58
  ],
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "bigcrunch",
3
+ "vendorUrl": "https://www.bigcrunch.com/",
4
+ "runContext": {
5
+ "main": true,
6
+ "frame": false
7
+ },
8
+ "prehideSelectors": ["#bc-cmp-host", "#bc-cmp-host-auto"],
9
+ "detectCmp": [
10
+ {
11
+ "exists": ["#bc-cmp-host, #bc-cmp-host-auto", "#bc-cmp-banner"]
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ["#bc-cmp-host, #bc-cmp-host-auto", "#bc-cmp-banner-container:not([style*=\"display: none\"]) #bc-cmp-banner"]
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ["#bc-cmp-host, #bc-cmp-host-auto", "#bc-cmp-banner [data-action=accept-all]"]
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "waitForThenClick": ["#bc-cmp-host, #bc-cmp-host-auto", "#bc-cmp-banner [data-action=reject-all]"]
27
+ }
28
+ ],
29
+ "test": [
30
+ {
31
+ "waitForVisible": [
32
+ "#bc-cmp-host, #bc-cmp-host-auto",
33
+ "#bc-cmp-banner-container:not([style*=\"display: none\"]) #bc-cmp-banner"
34
+ ],
35
+ "timeout": 2000,
36
+ "check": "none"
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "bricklink",
3
+ "vendorUrl": "https://www.bricklink.com/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://([a-z0-9-]+\\.)?bricklink\\.com/"
6
+ },
7
+ "prehideSelectors": [".blp-necessary-cookies-banner"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".blp-necessary-cookies-banner"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".blp-necessary-cookies-banner"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".blp-necessary-cookies-banner__button"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ".blp-necessary-cookies-banner__button"
26
+ }
27
+ ],
28
+ "test": [
29
+ {
30
+ "cookieContains": "has-dismissed-necessary-cookies-banner=true"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "ceneo",
3
+ "prehideSelectors": ["#js_cookie-consent-banner"],
4
+ "detectCmp": [{ "exists": "#js_cookie-consent-banner .js_cookie-consent-necessary" }],
5
+ "detectPopup": [{ "visible": "#js_cookie-consent-banner .js_cookie-consent-necessary" }],
6
+ "optIn": [{ "waitForThenClick": "#js_cookie-consent-banner .js_cookie-consent-agree" }],
7
+ "optOut": [{ "waitForThenClick": "#js_cookie-consent-banner .js_cookie-consent-necessary" }],
8
+ "test": [{ "waitForVisible": "#js_cookie-consent-banner", "timeout": 1000, "check": "none" }]
9
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "conjointly",
3
+ "vendorUrl": "https://conjointly.com/",
4
+ "runContext": {
5
+ "urlPattern": "^https://(www\\.)?conjointly\\.com/"
6
+ },
7
+ "prehideSelectors": [".cookie-prompt-container"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".cookie-prompt-container #custom-cookie-banner-container"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".cookie-prompt-container #custom-cookie-banner-container"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".cookie-prompt-container .confirm-all-cookies"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "if": {
26
+ "exists": ".cookie-prompt-container #analytic-cookie:checked"
27
+ },
28
+ "then": [
29
+ {
30
+ "click": ".cookie-prompt-container #analytic-cookie"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "waitForThenClick": ".cookie-prompt-container .confirm-cookies"
36
+ }
37
+ ],
38
+ "test": [
39
+ {
40
+ "cookieContains": "cookie_policy=false"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "dhbbank",
3
+ "vendorUrl": "https://www.dhbbank.com/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(www\\.)?dhbbank\\.(com|nl|be|de)/"
6
+ },
7
+ "prehideSelectors": ["dialog.js-cookie-bar"],
8
+ "detectCmp": [{ "exists": "dialog.js-cookie-bar .js-reject-all" }],
9
+ "detectPopup": [{ "visible": "dialog.js-cookie-bar .js-reject-all" }],
10
+ "optIn": [{ "waitForThenClick": "dialog.js-cookie-bar .js-accept-all" }],
11
+ "optOut": [{ "waitForThenClick": "dialog.js-cookie-bar .js-reject-all" }],
12
+ "test": [{ "waitForVisible": "dialog.js-cookie-bar", "check": "none", "timeout": 3000 }, { "cookieContains": "CookieLevel=Functional" }]
13
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "ee-consent-notice",
3
+ "vendorUrl": "https://docs.expressionengine.com/latest/add-ons/consent.html",
4
+ "prehideSelectors": [".cookieNoticeWrapper"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": ".cookieNoticeWrapper #cookieConsentFormAccept input[name^='ee:cookies_']"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": ".cookieNoticeWrapper #cookieConsentFormAccept"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": ".cookieNoticeWrapper #cookieConsentFormAccept button"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "if": {
23
+ "exists": ".cookieNoticeWrapper #cookieConsentFormDecline button"
24
+ },
25
+ "then": [
26
+ {
27
+ "waitForThenClick": ".cookieNoticeWrapper #cookieConsentFormDecline button"
28
+ }
29
+ ],
30
+ "else": [
31
+ {
32
+ "eval": "EVAL_EE_CONSENT_DECLINE_0"
33
+ },
34
+ {
35
+ "waitForThenClick": ".cookieNoticeWrapper #cookieConsentFormAccept button"
36
+ }
37
+ ]
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "fera-cookies",
3
+ "prehideSelectors": [".cookies-container:has(.accept-necessary-only-btn)"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": ".cookies-container .cookies-banner-non-essential .accept-necessary-only-btn"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": ".cookies-container"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "if": {
17
+ "visible": ".cookies-container .accept-all-cookies-btn"
18
+ },
19
+ "then": [
20
+ {
21
+ "click": ".cookies-container .accept-all-cookies-btn"
22
+ }
23
+ ],
24
+ "else": [
25
+ {
26
+ "waitForThenClick": ".cookies-container .accept-hide-message-btn"
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "waitForThenClick": ".cookies-accepted-container #closeStatusPopUp",
32
+ "timeout": 2000,
33
+ "optional": true
34
+ }
35
+ ],
36
+ "optOut": [
37
+ {
38
+ "if": {
39
+ "visible": ".cookies-container .accept-necessary-only-btn"
40
+ },
41
+ "then": [
42
+ {
43
+ "click": ".cookies-container .accept-necessary-only-btn"
44
+ }
45
+ ],
46
+ "else": [
47
+ {
48
+ "waitForThenClick": ".cookies-container .accept-hide-message-btn"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "waitForThenClick": ".cookies-accepted-container #closeStatusPopUp",
54
+ "timeout": 2000,
55
+ "optional": true
56
+ }
57
+ ],
58
+ "test": [
59
+ {
60
+ "cookieContains": "_website_cookie_essentialCookies=essentialCookies"
61
+ },
62
+ {
63
+ "cookieContains": "_website_cookie_usageCookies=",
64
+ "negated": true
65
+ }
66
+ ]
67
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "la7-cmp",
3
+ "vendorUrl": "https://www.la7.it/",
4
+ "prehideSelectors": ["#_evh-ric"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": "#_evh-ric #btn_donotaccept"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": "#_evh-ric #btn_donotaccept"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": "#_evh-ric #AcceptButton"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "waitForThenClick": "#_evh-ric #btn_donotaccept"
23
+ }
24
+ ],
25
+ "test": [
26
+ {
27
+ "cookieContains": "__cpmtAccept=false"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "laravel-cookie-consent",
3
+ "vendorUrl": "https://github.com/statikbe/laravel-cookie-consent",
4
+ "prehideSelectors": [".lcc-modal.js-lcc-modal-alert"],
5
+ "detectCmp": [
6
+ {
7
+ "exists": ".lcc-modal.js-lcc-modal-alert"
8
+ }
9
+ ],
10
+ "detectPopup": [
11
+ {
12
+ "visible": ".lcc-modal.js-lcc-modal-alert"
13
+ }
14
+ ],
15
+ "optIn": [
16
+ {
17
+ "waitForThenClick": ".lcc-modal.js-lcc-modal-alert .js-lcc-accept"
18
+ }
19
+ ],
20
+ "optOut": [
21
+ {
22
+ "waitForThenClick": ".lcc-modal.js-lcc-modal-alert .js-lcc-settings-toggle"
23
+ },
24
+ {
25
+ "waitForVisible": ".lcc-modal.js-lcc-modal-settings"
26
+ },
27
+ {
28
+ "click": ".lcc-modal.js-lcc-modal-settings input[type=checkbox]:checked:not(:disabled)",
29
+ "all": true,
30
+ "optional": true
31
+ },
32
+ {
33
+ "waitForThenClick": ".lcc-modal.js-lcc-modal-settings .js-lcc-settings-save"
34
+ },
35
+ {
36
+ "waitForVisible": ".lcc-modal.js-lcc-modal-alert",
37
+ "check": "none"
38
+ }
39
+ ],
40
+ "test": [
41
+ {
42
+ "cookieContains": "__cookie_consent=false"
43
+ }
44
+ ]
45
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "legislation-gov-uk",
3
+ "runContext": {
4
+ "urlPattern": "^https?://(\\w+\\.)?legislation\\.gov\\.uk/"
5
+ },
6
+ "prehideSelectors": [".cookie-preferences-banner"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": ".cookie-preferences-banner .reject-all-cookies"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": ".cookie-preferences-banner .reject-all-cookies"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": ".cookie-preferences-banner .accept-all-cookies"
20
+ },
21
+ {
22
+ "waitForThenClick": ".cookie-preferences-banner .dismiss-banner",
23
+ "timeout": 3000,
24
+ "optional": true
25
+ }
26
+ ],
27
+ "optOut": [
28
+ {
29
+ "waitForThenClick": ".cookie-preferences-banner .reject-all-cookies"
30
+ },
31
+ {
32
+ "comment": "a confirmation banner replaces the dialog after the choice",
33
+ "waitForThenClick": ".cookie-preferences-banner .dismiss-banner",
34
+ "timeout": 3000,
35
+ "optional": true
36
+ }
37
+ ],
38
+ "test": [
39
+ {
40
+ "cookieContains": "analytics%22%3Afalse"
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "mackeeper",
3
+ "vendorUrl": "https://mackeeper.com/",
4
+ "cosmetic": false,
5
+ "runContext": {
6
+ "urlPattern": "^https?://(\\w+\\.)?mackeeper\\.com/"
7
+ },
8
+ "prehideSelectors": [".js-gdpr-banner-top-hide"],
9
+ "detectCmp": [
10
+ {
11
+ "exists": ".js-gdpr-banner .js-gdpr-banner-top-hide"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ".js-gdpr-banner .js-gdpr-banner-top-hide"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "waitForThenClick": ".js-gdpr-banner-top-hide .js-gdpr-banner-agree"
22
+ }
23
+ ],
24
+ "optOut": [
25
+ {
26
+ "waitForThenClick": ".js-gdpr-banner-top-hide .js-gdpr-banner-disagree"
27
+ }
28
+ ],
29
+ "test": [
30
+ {
31
+ "cookieContains": "cookie_banner=false"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "ndl-go-jp",
3
+ "vendorUrl": "https://www.ndl.go.jp/",
4
+ "runContext": {
5
+ "urlPattern": "^https://([a-z0-9-]+\\.)?ndl\\.go\\.jp/"
6
+ },
7
+ "prehideSelectors": [".privacy-confirmation"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".privacy-confirmation .pc-buttons"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".privacy-confirmation .pc-buttons"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".privacy-confirmation [data-cy=privacy-accept-all], .privacy-confirmation [data-cy=accept-all-button]"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ".privacy-confirmation [data-cy=accept-core-button], .privacy-confirmation .pc-buttons > button.ui-parts-button-fill:not([data-cy])"
26
+ }
27
+ ],
28
+ "test": [
29
+ {
30
+ "waitForVisible": ".privacy-confirmation .pc-buttons",
31
+ "timeout": 2000,
32
+ "check": "none"
33
+ }
34
+ ]
35
+ }
@@ -7,9 +7,9 @@
7
7
  "optOut": [
8
8
  {
9
9
  "if": { "exists": "#bannerDeclineButton" },
10
- "then": [{ "click": "#bannerDeclineButton" }],
11
- "comment": "Without a decline button the only way out is the banner's link to the cookie preferences page, which paypal-cookieprefs submits after the navigation.",
12
- "else": [{ "click": "a#manageCookiesLink" }]
10
+ "then": [{ "waitForThenClick": "#bannerDeclineButton", "retry": 10, "retryInterval": 500 }],
11
+ "comment": "Without a decline button the only way out is the cookie preferences page, and the choice made there does not always stick, so the banner keeps coming back. Hide it instead.",
12
+ "else": [{ "hide": "#ccpaCookieBanner" }]
13
13
  }
14
14
  ],
15
15
  "test": [{ "wait": 1000 }, { "cookieContains": "type%3Dexplicit" }]
@@ -6,8 +6,11 @@
6
6
  "optIn": [{ "click": "#acceptAllButton" }],
7
7
  "optOut": [
8
8
  {
9
- "waitForThenClick": "#bannerDeclineButton"
9
+ "comment": "The banner renders before its click handler is attached, and early clicks are ignored.",
10
+ "waitForThenClick": "#bannerDeclineButton",
11
+ "retry": 10,
12
+ "retryInterval": 500
10
13
  }
11
14
  ],
12
- "test": [{ "wait": 500 }, { "cookieContains": "cookie_prefs" }]
15
+ "test": [{ "wait": 500 }, { "cookieContains": "type%3Dexplicit" }]
13
16
  }