@duckduckgo/autoconsent 16.47.0 → 16.49.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 (74) hide show
  1. package/.agents/skills/optimize-button-patterns/SKILL.md +145 -0
  2. package/.agents/skills/oxylabs-testing/SKILL.md +1 -1
  3. package/.claude/skills/optimize-button-patterns/SKILL.md +7 -0
  4. package/AGENTS.md +5 -0
  5. package/CHANGELOG.md +56 -0
  6. package/data/Readme.md +6 -0
  7. package/data/labelled-button-texts.csv +7006 -0
  8. package/dist/addon-firefox/background.bundle.js +2 -0
  9. package/dist/addon-firefox/compact-rules.json +1 -1
  10. package/dist/addon-firefox/content.bundle.js +6 -7
  11. package/dist/addon-firefox/manifest.json +1 -1
  12. package/dist/addon-firefox/rule-index.json +1 -1
  13. package/dist/addon-firefox/rules.json +1 -1
  14. package/dist/addon-mv3/background.bundle.js +2 -0
  15. package/dist/addon-mv3/compact-rules.json +1 -1
  16. package/dist/addon-mv3/content.bundle.js +6 -7
  17. package/dist/addon-mv3/manifest.json +1 -1
  18. package/dist/addon-mv3/rule-index.json +1 -1
  19. package/dist/addon-mv3/rules.json +1 -1
  20. package/dist/autoconsent.cjs.js +6 -7
  21. package/dist/autoconsent.esm.js +6 -7
  22. package/dist/autoconsent.playwright.js +6 -7
  23. package/dist/autoconsent.standalone.js +7 -8
  24. package/dist/types/eval-snippets.d.ts +1 -0
  25. package/lib/eval-snippets.ts +3 -0
  26. package/lib/heuristic-patterns.ts +4 -8
  27. package/package.json +3 -1
  28. package/rules/autoconsent/borlabs.json +5 -0
  29. package/rules/autoconsent/burpee-com.json +13 -7
  30. package/rules/autoconsent/consentmo.json +51 -7
  31. package/rules/autoconsent/cookie-popup-close-cookies.json +37 -0
  32. package/rules/autoconsent/cookieconsent2.json +6 -1
  33. package/rules/autoconsent/costco.json +27 -0
  34. package/rules/autoconsent/datasign.json +85 -0
  35. package/rules/autoconsent/ensembleartsphilly.json +33 -0
  36. package/rules/autoconsent/evium.de.json +33 -0
  37. package/rules/autoconsent/iubenda.json +13 -7
  38. package/rules/autoconsent/pandectes.json +48 -15
  39. package/rules/autoconsent/passle.json +32 -0
  40. package/rules/autoconsent/pmc-privacy-banner.json +9 -0
  41. package/rules/autoconsent/primeconsent.json +39 -0
  42. package/rules/autoconsent/shinden.pl.json +34 -0
  43. package/rules/autoconsent/tealium.json +1 -1
  44. package/rules/autoconsent/tri-table.json +14 -0
  45. package/rules/autoconsent/truevault-polaris.json +63 -0
  46. package/rules/autoconsent/webflow.json +1 -1
  47. package/rules/autoconsent/wix.json +90 -8
  48. package/rules/compact-rules.json +1 -1
  49. package/rules/rule-index.json +1 -1
  50. package/rules/rules.json +1 -1
  51. package/scripts/benchmark-button-classification.ts +75 -0
  52. package/scripts/button-text-benchmark.ts +102 -0
  53. package/tests/borlabs.spec.ts +7 -3
  54. package/tests/burpee-com.spec.ts +10 -4
  55. package/tests/consentmo.spec.ts +1 -0
  56. package/tests/cookie-popup-close-cookies.spec.ts +10 -0
  57. package/tests/cookieconsent2.spec.ts +6 -1
  58. package/tests/costco.spec.ts +5 -0
  59. package/tests/datasign.spec.ts +8 -0
  60. package/tests/ensembleartsphilly.spec.ts +6 -0
  61. package/tests/evium.de.spec.ts +5 -0
  62. package/tests/iubenda.spec.ts +6 -0
  63. package/tests/pandectes.spec.ts +20 -1
  64. package/tests/passle.spec.ts +8 -0
  65. package/tests/pmc-privacy-banner.spec.ts +8 -0
  66. package/tests/primeconsent.spec.ts +11 -0
  67. package/tests/shinden.pl.spec.ts +5 -0
  68. package/tests/tealium.spec.ts +8 -6
  69. package/tests/tri-table.spec.ts +5 -0
  70. package/tests/truevault-polaris.spec.ts +9 -0
  71. package/tests/webflow.spec.ts +7 -1
  72. package/tests/wix.spec.ts +8 -1
  73. package/tests-wtr/heuristics/button-classification-accuracy.test.ts +41 -0
  74. package/tests-wtr/heuristics/heuristics-utils.test.ts +9 -0
@@ -29,6 +29,7 @@ export declare const snippets: {
29
29
  EVAL_BORLABS_0: () => boolean;
30
30
  EVAL_CC_BANNER2_0: () => boolean;
31
31
  EVAL_COINBASE_0: () => boolean;
32
+ EVAL_COOKIE_POPUP_CLOSE: () => true;
32
33
  EVAL_COOKIE_LAW_INFO_0: () => boolean;
33
34
  EVAL_COOKIE_LAW_INFO_DETECT: () => boolean;
34
35
  EVAL_COOKIE_MANAGER_POPUP_0: () => boolean;
@@ -111,6 +111,9 @@ export const snippets = {
111
111
  EVAL_COINBASE_0: () =>
112
112
  JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent
113
113
  .length <= 1,
114
+ // the close icon is an SVG, which has no click() method
115
+ EVAL_COOKIE_POPUP_CLOSE: () =>
116
+ document.querySelector('#cookie-popup #close-cookies').dispatchEvent(new MouseEvent('click', { bubbles: true })) || true,
114
117
  EVAL_COOKIE_LAW_INFO_0: () => {
115
118
  if (CLI.disableAllCookies) CLI.disableAllCookies();
116
119
  if (CLI.reject_close) CLI.reject_close();
@@ -180,10 +180,10 @@ const REJECT_PATTERNS_ENGLISH = [
180
180
  /^\s*(continue|proceed|continue\s+browsing)\s+without\s+(accepting|agreeing|consent|cookies|tracking)(\s*→)?\s*$/is,
181
181
 
182
182
  // essential/necessary/functional-only, e.g. "essential cookies only", "accept only essential cookies",
183
- // "allow necessary cookies continue", "use essential cookies only", "functional only", "i confirm necessary"
183
+ // "allow necessary cookies continue", "use essential cookies only", "functional only", "essential only cookies", "i confirm necessary"
184
184
  /^\s*(i\s+)?(want\s+to\s+)?(only\s+)?(use|accept|allow|keep|enable|choose|continue\s+with|i\s+confirm)\s*(only\s+)?(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s*(continue|only)?\s*$/is,
185
185
  /^\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
- /^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s*(cookies)?\s+only\s*$/is,
186
+ /^\s*(strictly\s+)?(necessary|essential|essentials|functional|required|minimal)\s+((cookies\s+)?only|only\s+cookies)\s*$/is,
187
187
 
188
188
  // e.g. "do not sell or share my personal information", "opt out of sale ..." (CCPA)
189
189
  /do\s+not\s+sell|opt\s+out\s+of\s+sale/is,
@@ -645,13 +645,13 @@ export const ACCEPT_PATTERNS = [
645
645
  /^continue (and accept|using cookies|with (all|recommended cookies|cookies))$/is,
646
646
 
647
647
  // DE accept verbs
648
- /^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|schließen))?\s*$/is,
648
+ /^(alle[sn]?\s+|allem\s+|ich\s+|cookies\s+|ausgewählte\s+|webanalyse\s+)?(cookies?\s+)?(akzeptieren|annehmen|zustimmen|zulassen|erlauben|einwilligen|aktivieren|auswählen)(\s+(und\s+)?(weiter|schlie(ß|ss)en))?\s*$/is,
649
649
  /^((meine\s+)?auswahl|alle)\s+(bestätigen|akzeptieren|auswählen)$/is,
650
650
  /^(alle[nm]?\s+)?(zustimmen|einverstanden|einwilligung|zustimmung)$/is,
651
651
  /^ich (bin einverstanden|akzeptiere( alle)?|stimme zu)$/is,
652
652
 
653
653
  // NL accept verbs
654
- /^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+(en\s+(sluiten|doorgaan|verdergaan)|cookies|alle))?\s*$/is,
654
+ /^(ja,?\s+)?(alle[s]?\s+|ik\s+)?(cookies?\s+)?(accepteer|accepteren|toestaan|aanvaard|aanvaarden|ga akkoord|akkoord)(\s+((en\s+)?sluiten|en\s+(doorgaan|verdergaan)|cookies|alle))?\s*$/is,
655
655
  /^(selectie (accepteren|toestaan)|accepteer (selectie|alle)|alle (toestaan|accepteren|aanvaarden)|ja, (dat is prima|prima|alles toestaan|accepteren|ik accepteer cookies|ik ga akkoord)|is goed)$/is,
656
656
 
657
657
  // FR accept verbs
@@ -813,11 +813,7 @@ export const ACKNOWLEDGE_PATTERNS = [
813
813
  /understood$/is,
814
814
  'confirm my choices',
815
815
 
816
- // French (FR)
817
- 'accepter fermer',
818
-
819
816
  // German (DE)
820
- 'akzeptieren schließen',
821
817
  'speichern schließen',
822
818
 
823
819
  // Spanish (ES)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "16.47.0",
3
+ "version": "16.49.0",
4
4
  "description": "",
5
5
  "types": "./dist/types/web.d.ts",
6
6
  "exports": {
@@ -36,6 +36,7 @@
36
36
  "launch:firefox": "web-ext run -s dist/addon-firefox",
37
37
  "release": "auto shipit",
38
38
  "get-text-for-xpath": "ts-node scripts/get-text-for-xpath.ts",
39
+ "benchmark-buttons": "ts-node scripts/benchmark-button-classification.ts",
39
40
  "bundle-config-rules": "ts-node scripts/bundle-config-rules.ts",
40
41
  "check-pr-release-labels": "ts-node scripts/check-pr-release-labels.ts"
41
42
  },
@@ -59,6 +60,7 @@
59
60
  "bulma": "^1.0.2",
60
61
  "chai": "^6.0.1",
61
62
  "chokidar-cli": "^3.0.0",
63
+ "csv-parse": "^6.2.1",
62
64
  "esbuild": "^0.28.0",
63
65
  "eslint": "^10.0.3",
64
66
  "globals": "^17.4.0",
@@ -17,6 +17,11 @@
17
17
  }
18
18
  ],
19
19
  "optOut": [
20
+ {
21
+ "waitFor": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse],.brlbs-btn-save,#CookieBoxSaveButton,.brlbs-cmpnt-close-button[data-borlabs-cookie-actions=\"close-button\"],a[data-cookie-individual]",
22
+ "timeout": 3000,
23
+ "optional": true
24
+ },
20
25
  {
21
26
  "if": {
22
27
  "exists": ".brlbs-btn-accept-only-essential,a[data-cookie-refuse]"
@@ -6,13 +6,19 @@
6
6
  "optIn": [{ "waitForThenClick": "#btn-cookie-allow" }],
7
7
  "optOut": [
8
8
  {
9
- "if": { "exists": "#btn-cookie-manage" },
10
- "then": [
11
- { "waitForThenClick": "#btn-cookie-manage" },
12
- { "click": "#notice-cookie-block input:checked", "all": true },
13
- { "click": "#btn-cookie-save" }
14
- ],
15
- "else": [{ "hide": "#html-body #notice-cookie-block, #notice-cookie" }]
9
+ "if": { "exists": "#notice-cookie-block #btn-cookie-decline" },
10
+ "then": [{ "waitForThenClick": "#notice-cookie-block #btn-cookie-decline" }],
11
+ "else": [
12
+ {
13
+ "if": { "exists": "#btn-cookie-manage" },
14
+ "then": [
15
+ { "waitForThenClick": "#btn-cookie-manage" },
16
+ { "click": "#notice-cookie-block input:checked", "all": true },
17
+ { "click": "#btn-cookie-save" }
18
+ ],
19
+ "else": [{ "hide": "#html-body #notice-cookie-block, #notice-cookie" }]
20
+ }
21
+ ]
16
22
  }
17
23
  ]
18
24
  }
@@ -13,23 +13,67 @@
13
13
  ],
14
14
  "optIn": [
15
15
  {
16
- "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-allow"]
16
+ "waitForThenClick": [
17
+ "csm-cookie-consent",
18
+ ".csm-wrapper [data-csm-button-type='accept'], .csm-wrapper .cc-allow:not([data-csm-button-type])"
19
+ ]
17
20
  }
18
21
  ],
19
22
  "optOut": [
20
23
  {
21
- "if": { "exists": ["csm-cookie-consent", ".csm-wrapper .cc-deny"] },
24
+ "if": {
25
+ "exists": ["csm-cookie-consent", ".csm-wrapper .cc-deny, .csm-wrapper [data-csm-button-type='reject']"]
26
+ },
22
27
  "then": [
23
28
  {
24
- "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
29
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-deny, .csm-wrapper [data-csm-button-type='reject']"]
25
30
  }
26
31
  ],
27
32
  "else": [
28
33
  {
29
- "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-settings"]
30
- },
31
- {
32
- "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
34
+ "if": {
35
+ "exists": ["csm-cookie-consent", ".csm-wrapper [data-csm-button-type='do_not_sell']"]
36
+ },
37
+ "then": [
38
+ {
39
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper [data-csm-button-type='do_not_sell']"]
40
+ },
41
+ {
42
+ "comment": "the banner stays open after opting out of sale, close it",
43
+ "waitForThenClick": ["csm-cookie-consent", ".csm-wrapper [data-csm-button-type='dismiss']"],
44
+ "timeout": 2000,
45
+ "optional": true
46
+ }
47
+ ],
48
+ "else": [
49
+ {
50
+ "waitForThenClick": [
51
+ "csm-cookie-consent",
52
+ ".csm-wrapper .cc-settings, .csm-wrapper [data-csm-button-type='preferences']"
53
+ ]
54
+ },
55
+ {
56
+ "waitForVisible": [
57
+ "csm-cookie-consent",
58
+ ".csm-wrapper .cc-deny, .csm-wrapper [data-csm-button-type='accept_selected']"
59
+ ]
60
+ },
61
+ {
62
+ "if": {
63
+ "exists": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
64
+ },
65
+ "then": [
66
+ {
67
+ "click": ["csm-cookie-consent", ".csm-wrapper .cc-deny"]
68
+ }
69
+ ],
70
+ "else": [
71
+ {
72
+ "click": ["csm-cookie-consent", ".csm-wrapper [data-csm-button-type='accept_selected']"]
73
+ }
74
+ ]
75
+ }
76
+ ]
33
77
  }
34
78
  ]
35
79
  }
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "cookie-popup-close-cookies",
3
+ "prehideSelectors": ["#cookie-popup"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": "#cookie-popup #close-cookies"
7
+ },
8
+ {
9
+ "exists": "#cookie-popup #view-all"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "exists": "#cookie-popup:not([class*=\"invisible\"]) #close-cookies"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": "#cookie-popup #accept-all"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "eval": "EVAL_COOKIE_POPUP_CLOSE"
25
+ },
26
+ {
27
+ "waitFor": "#cookie-popup[class*=\"invisible\"]",
28
+ "timeout": 2000
29
+ }
30
+ ],
31
+ "test": [
32
+ {
33
+ "cookieContains": "acceptedAnalytics=granted",
34
+ "negated": true
35
+ }
36
+ ]
37
+ }
@@ -25,7 +25,12 @@
25
25
  {
26
26
  "if": { "exists": "#s-rall-bn" },
27
27
  "then": [{ "waitForThenClick": "#s-rall-bn" }],
28
- "else": [{ "waitForThenClick": "#c-s-bn" }, { "wait": 500 }, { "waitForThenClick": "#s-sv-bn" }]
28
+ "else": [
29
+ { "waitForThenClick": "#c-s-bn" },
30
+ { "wait": 500 },
31
+ { "click": "#s-bl input.c-tgl:checked:not(:disabled)", "all": true, "optional": true },
32
+ { "waitForThenClick": "#s-sv-bn" }
33
+ ]
29
34
  }
30
35
  ],
31
36
  "test": [
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "costco",
3
+ "vendorUrl": "https://www.costco.ca/",
4
+ "cosmetic": true,
5
+ "comment": "The banner runs on Transcend airgap, whose setConsent() rejects consent changes unless the click event is trusted (isTrusted), so scripted clicks can't save an opt-out.",
6
+ "prehideSelectors": ["#costco-consent-manager [data-testid=\"Popup\"]"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": "#costco-consent-manager [data-testid=\"Popup\"]"
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": "#costco-consent-manager [data-testid=\"Popup\"]"
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": "#costco-consent-manager [data-testid=\"Popup\"] button.MuiButton-primary"
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "hide": "#costco-consent-manager"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "datasign",
3
+ "vendorUrl": "https://datasign.jp/",
4
+ "cosmetic": false,
5
+ "prehideSelectors": [],
6
+ "detectCmp": [
7
+ {
8
+ "exists": "#datasign_cmp__host"
9
+ }
10
+ ],
11
+ "detectPopup": [
12
+ {
13
+ "visible": ["#datasign_cmp__host", "#datasign_cmp__cmp_summary"]
14
+ }
15
+ ],
16
+ "optIn": [
17
+ {
18
+ "if": {
19
+ "exists": ["#datasign_cmp__host", "#datasign_cmp__cmp_content input[type=checkbox]:not([disabled])"]
20
+ },
21
+ "then": [
22
+ {
23
+ "waitForThenClick": [
24
+ "#datasign_cmp__host",
25
+ "#datasign_cmp__config-button, #datasign_cmp__cmp_summary [aria-controls=datasign_cmp__cmp_content]"
26
+ ]
27
+ },
28
+ {
29
+ "waitForVisible": ["#datasign_cmp__host", "#datasign_cmp__cmp_content_apply-button"]
30
+ },
31
+ {
32
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_content input[type=checkbox]:not(:checked):not([disabled])"],
33
+ "all": true,
34
+ "optional": true
35
+ },
36
+ {
37
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_content_apply-button"]
38
+ }
39
+ ],
40
+ "else": [
41
+ {
42
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_summary .datasign__dialogCloseButton--index-module"]
43
+ }
44
+ ]
45
+ }
46
+ ],
47
+ "optOut": [
48
+ {
49
+ "if": {
50
+ "exists": ["#datasign_cmp__host", "#datasign_cmp__cmp_content input[type=checkbox]:not([disabled])"]
51
+ },
52
+ "then": [
53
+ {
54
+ "waitForThenClick": [
55
+ "#datasign_cmp__host",
56
+ "#datasign_cmp__config-button, #datasign_cmp__cmp_summary [aria-controls=datasign_cmp__cmp_content]"
57
+ ]
58
+ },
59
+ {
60
+ "waitForVisible": ["#datasign_cmp__host", "#datasign_cmp__cmp_content_apply-button"]
61
+ },
62
+ {
63
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_content input[type=checkbox]:checked:not([disabled])"],
64
+ "all": true,
65
+ "optional": true
66
+ },
67
+ {
68
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_content_apply-button"]
69
+ }
70
+ ],
71
+ "else": [
72
+ {
73
+ "click": ["#datasign_cmp__host", "#datasign_cmp__cmp_summary .datasign__dialogCloseButton--index-module"]
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "test": [
79
+ {
80
+ "waitForVisible": ["#datasign_cmp__host", "#datasign_cmp__cmp_summary"],
81
+ "check": "none",
82
+ "timeout": 3000
83
+ }
84
+ ]
85
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "ensembleartsphilly",
3
+ "vendorUrl": "https://www.ensembleartsphilly.org/",
4
+ "runContext": {
5
+ "urlPattern": "^https?://(\\w+\\.)?ensembleartsphilly\\.org/"
6
+ },
7
+ "prehideSelectors": [".global-cookie.js-cookie-banner"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": ".global-cookie.js-cookie-banner .global-cookie__button"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": ".global-cookie.js-cookie-banner:not(.global-cookie__hidden)"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": ".global-cookie.js-cookie-banner .global-cookie__button"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": ".global-cookie.js-cookie-banner .global-cookie__button"
26
+ }
27
+ ],
28
+ "test": [
29
+ {
30
+ "cookieContains": "_consent_banner_read=true"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "evium.de",
3
+ "vendorUrl": "https://www.evium.de/",
4
+ "runContext": {
5
+ "urlPattern": "^https://(www\\.)?evium\\.de/"
6
+ },
7
+ "prehideSelectors": ["common-tracking-optin"],
8
+ "detectCmp": [
9
+ {
10
+ "exists": "common-tracking-optin"
11
+ }
12
+ ],
13
+ "detectPopup": [
14
+ {
15
+ "visible": "common-tracking-optin"
16
+ }
17
+ ],
18
+ "optIn": [
19
+ {
20
+ "waitForThenClick": "common-tracking-optin button.mdc-button--raised"
21
+ }
22
+ ],
23
+ "optOut": [
24
+ {
25
+ "waitForThenClick": "common-tracking-optin p.opt-in__text-item:nth-of-type(2) > a:last-of-type"
26
+ },
27
+ {
28
+ "waitForVisible": "common-tracking-optin",
29
+ "check": "none",
30
+ "timeout": 2000
31
+ }
32
+ ]
33
+ }
@@ -10,13 +10,19 @@
10
10
  "then": [{ "click": ".iubenda-cs-reject-btn" }],
11
11
  "else": [
12
12
  {
13
- "waitForThenClick": ".iubenda-cs-customize-btn"
14
- },
15
- {
16
- "waitForThenClick": ".iub-btn-reject"
17
- },
18
- {
19
- "waitForThenClick": "#iubFooterBtn"
13
+ "if": { "exists": ".iubenda-cs-customize-btn" },
14
+ "then": [
15
+ {
16
+ "waitForThenClick": ".iubenda-cs-customize-btn"
17
+ },
18
+ {
19
+ "waitForThenClick": ".iub-btn-reject"
20
+ },
21
+ {
22
+ "waitForThenClick": "#iubFooterBtn"
23
+ }
24
+ ],
25
+ "else": [{ "hide": "#iubenda-cs-banner" }]
20
26
  }
21
27
  ]
22
28
  }
@@ -1,36 +1,69 @@
1
1
  {
2
2
  "name": "pandectes",
3
3
  "vendorUrl": "https://pandectes.io/",
4
- "prehideSelectors": ["#pandectes-banner"],
4
+ "prehideSelectors": ["#pandectes-banner", "pandectes-cmp"],
5
5
  "detectCmp": [
6
6
  {
7
- "exists": "#pandectes-banner"
7
+ "any": [{ "exists": "#pandectes-banner" }, { "exists": ["pandectes-cmp", "dialog.notice"] }]
8
8
  }
9
9
  ],
10
10
  "detectPopup": [
11
11
  {
12
- "visible": "#pandectes-banner"
12
+ "any": [{ "visible": "#pandectes-banner" }, { "visible": ["pandectes-cmp", "dialog.notice"] }]
13
13
  }
14
14
  ],
15
15
  "optIn": [
16
16
  {
17
- "waitForThenClick": "#pandectes-banner .cc-allow"
18
- },
19
- { "hide": "#pandectes-banner", "optional": true }
17
+ "if": { "exists": "#pandectes-banner" },
18
+ "then": [
19
+ {
20
+ "waitForThenClick": "#pandectes-banner .cc-allow"
21
+ },
22
+ { "hide": "#pandectes-banner", "optional": true }
23
+ ],
24
+ "else": [{ "waitForThenClick": ["pandectes-cmp", "dialog.notice button.allow"] }]
25
+ }
20
26
  ],
21
27
  "optOut": [
22
28
  {
23
- "if": { "visible": "#pandectes-banner .cc-deny" },
24
- "then": [{ "waitForThenClick": "#pandectes-banner .cc-deny" }],
29
+ "if": { "exists": "#pandectes-banner" },
30
+ "then": [
31
+ {
32
+ "if": { "visible": "#pandectes-banner .cc-deny" },
33
+ "then": [{ "waitForThenClick": "#pandectes-banner .cc-deny" }],
34
+ "else": [
35
+ { "waitForThenClick": "#pandectes-banner .cc-settings" },
36
+ { "waitForVisible": ".pd-cp-ui-rejectAll" },
37
+ { "click": ".pd-cp-ui-rejectAll" },
38
+ { "waitForVisible": ".pd-cp-ui-save" },
39
+ { "click": ".pd-cp-ui-save" }
40
+ ]
41
+ },
42
+ { "hide": "#pandectes-banner", "optional": true }
43
+ ],
25
44
  "else": [
26
- { "waitForThenClick": "#pandectes-banner .cc-settings" },
27
- { "waitForVisible": ".pd-cp-ui-rejectAll" },
28
- { "click": ".pd-cp-ui-rejectAll" },
29
- { "waitForVisible": ".pd-cp-ui-save" },
30
- { "click": ".pd-cp-ui-save" }
45
+ {
46
+ "if": { "visible": ["pandectes-cmp", "dialog.notice button.deny"] },
47
+ "then": [{ "waitForThenClick": ["pandectes-cmp", "dialog.notice button.deny"] }],
48
+ "else": [
49
+ { "waitForThenClick": ["pandectes-cmp", "dialog.notice button.preferences"] },
50
+ { "waitForVisible": ["pandectes-cmp", "dialog.preferences"] },
51
+ {
52
+ "if": { "exists": ["pandectes-cmp", "dialog.preferences button.deny"] },
53
+ "then": [{ "click": ["pandectes-cmp", "dialog.preferences button.deny"] }],
54
+ "else": [
55
+ {
56
+ "click": ["pandectes-cmp", "dialog.preferences button[role=switch][aria-checked=true]:not([disabled])"],
57
+ "all": true,
58
+ "optional": true
59
+ },
60
+ { "click": ["pandectes-cmp", "dialog.preferences button.custom"] }
61
+ ]
62
+ }
63
+ ]
64
+ }
31
65
  ]
32
- },
33
- { "hide": "#pandectes-banner", "optional": true }
66
+ }
34
67
  ],
35
68
  "test": [{ "wait": 500 }, { "eval": "EVAL_PANDECTES_TEST" }]
36
69
  }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "passle",
3
+ "prehideSelectors": ["#passle-cookie-control-container #cookie-control"],
4
+ "detectCmp": [
5
+ {
6
+ "exists": "#passle-cookie-control-container"
7
+ }
8
+ ],
9
+ "detectPopup": [
10
+ {
11
+ "visible": "#passle-cookie-control-container.cookie-control_state--open #cookie-control"
12
+ }
13
+ ],
14
+ "optIn": [
15
+ {
16
+ "waitForThenClick": "#cookie-control .cookie-control--accept"
17
+ }
18
+ ],
19
+ "optOut": [
20
+ {
21
+ "waitForThenClick": "#cookie-control .cookie-control--decline"
22
+ }
23
+ ],
24
+ "test": [
25
+ {
26
+ "wait": 1000
27
+ },
28
+ {
29
+ "cookieContains": "passleCookieControl={%22Accepted%22:false"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "pmc-privacy-banner",
3
+ "prehideSelectors": ["aside[aria-labelledby=\"pmc-privacy-banner-heading\"]"],
4
+ "detectCmp": [{ "exists": "aside[aria-labelledby=\"pmc-privacy-banner-heading\"]" }],
5
+ "detectPopup": [{ "visible": "aside[aria-labelledby=\"pmc-privacy-banner-heading\"]" }],
6
+ "optIn": [{ "waitForThenClick": "aside[aria-labelledby=\"pmc-privacy-banner-heading\"] button" }],
7
+ "optOut": [{ "waitForThenClick": "aside[aria-labelledby=\"pmc-privacy-banner-heading\"] button" }],
8
+ "test": [{ "visible": "aside[aria-labelledby=\"pmc-privacy-banner-heading\"]", "check": "none" }]
9
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "primeconsent",
3
+ "_metadata": {
4
+ "vendorUrl": "https://privacypillar.com/"
5
+ },
6
+ "prehideSelectors": [".azpp-cookie-consent"],
7
+ "detectCmp": [
8
+ {
9
+ "exists": [".azpp-cookie-consent", ".banner-main"]
10
+ }
11
+ ],
12
+ "detectPopup": [
13
+ {
14
+ "visible": [".azpp-cookie-consent", ".banner-main .button-group > button"]
15
+ }
16
+ ],
17
+ "optIn": [
18
+ {
19
+ "waitForThenClick": [".azpp-cookie-consent", ".banner-main .button-group > button:last-of-type"]
20
+ }
21
+ ],
22
+ "optOut": [
23
+ {
24
+ "waitForThenClick": [".azpp-cookie-consent", ".banner-main .button-group > button:nth-of-type(2):nth-last-of-type(2)"]
25
+ }
26
+ ],
27
+ "test": [
28
+ {
29
+ "any": [
30
+ {
31
+ "cookieContains": "\"status\":\"reject_all\""
32
+ },
33
+ {
34
+ "cookieContains": "\"status\":\"do_not_sell\""
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }