@duckduckgo/autoconsent 7.0.0 → 8.0.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 (87) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/build.sh +1 -1
  3. package/data/coverage.json +1014 -937
  4. package/dist/addon-firefox/background.bundle.js +3 -0
  5. package/dist/addon-firefox/content.bundle.js +13 -12
  6. package/dist/addon-firefox/manifest.json +1 -1
  7. package/dist/addon-firefox/rules.json +111 -187
  8. package/dist/addon-mv3/background.bundle.js +3 -0
  9. package/dist/addon-mv3/content.bundle.js +13 -12
  10. package/dist/addon-mv3/manifest.json +1 -1
  11. package/dist/addon-mv3/rules.json +111 -187
  12. package/dist/autoconsent.cjs.js +13 -12
  13. package/dist/autoconsent.esm.js +13 -12
  14. package/dist/autoconsent.playwright.js +1 -1
  15. package/lib/cmps/evidon.ts +1 -1
  16. package/lib/cmps/trustarc-top.ts +1 -1
  17. package/lib/eval-snippets.ts +3 -0
  18. package/lib/rule-executors.ts +4 -4
  19. package/lib/rules.ts +1 -6
  20. package/lib/utils.ts +3 -5
  21. package/lib/web.ts +1 -1
  22. package/package.json +2 -2
  23. package/readme.md +37 -28
  24. package/rules/autoconsent/1password-com.json +1 -1
  25. package/rules/autoconsent/agolde-com.json +1 -1
  26. package/rules/autoconsent/altium-com.json +1 -1
  27. package/rules/autoconsent/aquasana-com.json +1 -1
  28. package/rules/autoconsent/athlinks-com.json +1 -1
  29. package/rules/autoconsent/ausopen.json +1 -1
  30. package/rules/autoconsent/baden-wuerttemberg-de.json +1 -1
  31. package/rules/autoconsent/bbb.json +1 -1
  32. package/rules/autoconsent/burpee-com.json +1 -1
  33. package/rules/autoconsent/cc-banner.json +1 -1
  34. package/rules/autoconsent/clustrmaps-com.json +1 -1
  35. package/rules/autoconsent/complianz-notice.json +1 -1
  36. package/rules/autoconsent/cookie-law-info.json +1 -1
  37. package/rules/autoconsent/cookie-notice.json +1 -1
  38. package/rules/autoconsent/cookieinformation.json +1 -1
  39. package/rules/autoconsent/cookieyes.json +1 -1
  40. package/rules/autoconsent/crossfit-com.json +1 -1
  41. package/rules/autoconsent/dailymotion-us.json +1 -1
  42. package/rules/autoconsent/delta-com.json +1 -1
  43. package/rules/autoconsent/dsgvo.json +1 -1
  44. package/rules/autoconsent/eu-cookie-compliance.json +1 -1
  45. package/rules/autoconsent/eu-cookie-law.json +1 -1
  46. package/rules/autoconsent/geeks-for-geeks.json +1 -1
  47. package/rules/autoconsent/generic-cosmetic.json +1 -1
  48. package/rules/autoconsent/hl-co-uk.json +1 -1
  49. package/rules/autoconsent/indeed-com.json +1 -1
  50. package/rules/autoconsent/itopvpn-com.json +1 -1
  51. package/rules/autoconsent/iwink.json +19 -0
  52. package/rules/autoconsent/jquery-cookiebar.json +1 -1
  53. package/rules/autoconsent/macpaw-com.json +1 -1
  54. package/rules/autoconsent/marksandspencer.json +1 -1
  55. package/rules/autoconsent/midway-usa.json +1 -1
  56. package/rules/autoconsent/moove.json +1 -1
  57. package/rules/autoconsent/nba-com.json +1 -1
  58. package/rules/autoconsent/netflix-de.json +1 -1
  59. package/rules/autoconsent/notice-cookie.json +1 -1
  60. package/rules/autoconsent/nrk-no.json +1 -1
  61. package/rules/autoconsent/osano.json +1 -1
  62. package/rules/autoconsent/pinetools-com.json +1 -1
  63. package/rules/autoconsent/pmc-cmp.json +1 -1
  64. package/rules/autoconsent/pornhub.json +1 -1
  65. package/rules/autoconsent/pornpics.json +1 -1
  66. package/rules/autoconsent/primebox.json +1 -1
  67. package/rules/autoconsent/samsung-com.json +1 -1
  68. package/rules/autoconsent/similarweb-com.json +1 -1
  69. package/rules/autoconsent/takealot-com.json +1 -1
  70. package/rules/autoconsent/tealium.json +19 -6
  71. package/rules/autoconsent/testcmp-cosmetic.json +1 -1
  72. package/rules/autoconsent/tidbits-com.json +1 -1
  73. package/rules/autoconsent/tractor-supply.json +1 -1
  74. package/rules/autoconsent/trader-joes-com.json +1 -1
  75. package/rules/autoconsent/true-car.json +1 -1
  76. package/rules/autoconsent/tumblr-com.json +1 -1
  77. package/rules/autoconsent/twitch.json +1 -1
  78. package/rules/autoconsent/uk-cookie-consent.json +1 -1
  79. package/rules/autoconsent/urbanarmorgear-com.json +1 -1
  80. package/rules/autoconsent/whitepages.json +1 -1
  81. package/rules/autoconsent/wpcc.json +1 -1
  82. package/rules/autoconsent/xhamster-us.json +1 -1
  83. package/rules/autoconsent/xnxx-com.json +1 -1
  84. package/rules/autoconsent/youporn.json +1 -1
  85. package/rules/rules.json +111 -187
  86. package/tests/iwink.spec.ts +8 -0
  87. package/tests/tealium.spec.ts +6 -0
@@ -30,7 +30,7 @@ export default class Evidon extends AutoConsentCMPBase {
30
30
  return true;
31
31
  }
32
32
 
33
- hideElements(getStyleElement(), ["#evidon-prefdiag-overlay", "#evidon-prefdiag-background"]);
33
+ hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background");
34
34
  click("#_evidon-option-button");
35
35
 
36
36
  await waitForElement("#evidon-prefdiag-overlay", 5000);
@@ -73,7 +73,7 @@ export default class TrustArcTop extends AutoConsentCMPBase {
73
73
  // hide elements permanently, so user doesn't see the popup
74
74
  hideElements(
75
75
  getStyleElement(),
76
- [".truste_popframe", ".truste_overlay", ".truste_box_overlay", bannerContainer],
76
+ `.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`,
77
77
  );
78
78
  click(cookieSettingsButton);
79
79
 
@@ -59,6 +59,7 @@ export const snippets = {
59
59
  EVAL_GOOGLE_0: () => !!document.cookie.match(/SOCS=CAE/),
60
60
  EVAL_IUBENDA_0: () => document.querySelectorAll('.purposes-item input[type=checkbox]:not([disabled])').forEach(x => {if(x.checked) x.click()}) || true,
61
61
  EVAL_IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/),
62
+ EVAL_IWINK_TEST: () => document.cookie.includes('cookie_permission_granted=no'),
62
63
  EVAL_JQUERY_COOKIEBAR_0: () => !document.cookie.includes('cookies-state=accepted'),
63
64
  EVAL_MEDIAVINE_0: () => document.querySelectorAll("[data-name=\"mediavine-gdpr-cmp\"] input[type=checkbox]").forEach(x => x.checked && x.click()) || true,
64
65
  EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Reject|Ablehnen'))[0].click() || true,
@@ -81,8 +82,10 @@ export const snippets = {
81
82
  EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes('false'),
82
83
  EVAL_TEALIUM_0: () => typeof window.utag !== 'undefined' && typeof utag.gdpr === 'object',
83
84
  EVAL_TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true,
85
+ EVAL_TEALIUM_DONOTSELL: () => utag.gdpr.dns?.setDnsState(false) || true,
84
86
  EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
85
87
  EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
88
+ EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
86
89
  EVAL_TESTCMP_0: () => window.results.results[0] === 'button_clicked',
87
90
  EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === 'banner_hidden',
88
91
  EVAL_THEFREEDICTIONARY_0: () => cmpUi.showPurposes() || cmpUi.rejectAll() || true,
@@ -78,16 +78,16 @@ export function wait(ms: number): Promise<true> {
78
78
  });
79
79
  }
80
80
 
81
- export function hide(selectors: string[], method: HideMethod): boolean {
81
+ export function hide(selector: string, method: HideMethod): boolean {
82
82
  // enableLogs && console.log("[hide]", ruleStep.hide, ruleStep.method);
83
83
  const styleEl = getStyleElement();
84
- return hideElements(styleEl, selectors, method);
84
+ return hideElements(styleEl, selector, method);
85
85
  }
86
86
 
87
- export function prehide(selectors: string[]): boolean {
87
+ export function prehide(selector: string): boolean {
88
88
  const styleEl = getStyleElement('autoconsent-prehide');
89
89
  enableLogs && console.log("[prehide]", styleEl, location.href);
90
- return hideElements(styleEl, selectors, "opacity");
90
+ return hideElements(styleEl, selector, "opacity");
91
91
  }
92
92
 
93
93
  export function undoPrehide(): boolean {
package/lib/rules.ts CHANGED
@@ -32,7 +32,6 @@ export type AutoConsentRuleStep = { optional?: boolean } &
32
32
  Partial<ClickRule> &
33
33
  Partial<WaitForThenClickRule> &
34
34
  Partial<WaitRule> &
35
- Partial<UrlRule> &
36
35
  Partial<HideRule> &
37
36
  Partial<IfRule> &
38
37
  Partial<AnyRule>
@@ -78,14 +77,10 @@ export type WaitRule = {
78
77
  wait: number;
79
78
  };
80
79
 
81
- export type UrlRule = {
82
- url: string;
83
- };
84
-
85
80
  export type HideMethod = 'display' | 'opacity';
86
81
 
87
82
  export type HideRule = {
88
- hide: string[];
83
+ hide: string;
89
84
  method?: HideMethod;
90
85
  };
91
86
 
package/lib/utils.ts CHANGED
@@ -21,17 +21,15 @@ export function getStyleElement(styleOverrideElementId = "autoconsent-css-rules"
21
21
  // hide elements with a CSS rule
22
22
  export function hideElements(
23
23
  styleEl: HTMLStyleElement,
24
- selectors: string[],
24
+ selector: string,
25
25
  method: HideMethod = 'display',
26
26
  ): boolean {
27
27
  const hidingSnippet = method === "opacity" ? `opacity: 0` : `display: none`; // use display by default
28
- const rule = `${selectors.join(
29
- ","
30
- )} { ${hidingSnippet} !important; z-index: -1 !important; pointer-events: none !important; } `;
28
+ const rule = `${selector} { ${hidingSnippet} !important; z-index: -1 !important; pointer-events: none !important; } `;
31
29
 
32
30
  if (styleEl instanceof HTMLStyleElement) {
33
31
  styleEl.innerText += rule;
34
- return selectors.length > 0;
32
+ return selector.length > 0;
35
33
  }
36
34
  return false;
37
35
  }
package/lib/web.ts CHANGED
@@ -376,7 +376,7 @@ export default class AutoConsent {
376
376
  this.undoPrehide();
377
377
  }
378
378
  }, this.config.prehideTimeout || 2000);
379
- return prehide(selectors);
379
+ return prehide(selectors.join(','));
380
380
  }
381
381
 
382
382
  undoPrehide(): boolean {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "",
5
5
  "main": "dist/autoconsent.cjs.js",
6
6
  "module": "dist/autoconsent.esm.js",
@@ -39,7 +39,7 @@
39
39
  "@typescript-eslint/parser": "^6.12.0",
40
40
  "auto": "^11.0.1",
41
41
  "bulma": "^0.9.4",
42
- "chai": "^4.2.0",
42
+ "chai": "^5.0.0",
43
43
  "chokidar-cli": "^3.0.0",
44
44
  "esbuild": "^0.19.2",
45
45
  "eslint": "^8.27.0",
package/readme.md CHANGED
@@ -37,7 +37,7 @@ that are installed on multiple sites. Each CMP ruleset defines:
37
37
 
38
38
  There are currently three ways of implementing a CMP:
39
39
 
40
- 1. As a [JSON ruleset](./rules/autoconsent/), intepreted by the `AutoConsent` class.
40
+ 1. As a [JSON ruleset](./rules/autoconsent/), intepreted by the `AutoConsent` class.
41
41
  1. As a class implementing the `AutoCMP` interface. This enables more complex logic than the linear AutoConsent
42
42
  rulesets allow.
43
43
  3. As a [Consent-O-Matic](https://github.com/cavi-au/Consent-O-Matic) rule. The `ConsentOMaticCMP` class implements
@@ -79,36 +79,45 @@ Both JSON and class implementations have the following components:
79
79
 
80
80
  ### Element selectors
81
81
 
82
- Most rules use "selectors" to locate elements in a page. In most cases, a selector can be a string, or array of strings, which are used to locale elements as follows:
82
+ Many rules use `ElementSelector` to locate elements in a page. `ElementSelector` can be a string, or array of strings, which are used to locate elements as follows:
83
83
  - By default, strings are treated as [CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) via the `querySelector` API. e.g. `#reject-cookies` to find an element whose `id` is 'reject-cookies'.
84
- - Selectors prefixed with `xpath/` are [Xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) selectors which can locate elements in the page via [`document.evaluate`](https://developer.mozilla.org/en-US/docs/Web/XPath/Introduction_to_using_XPath_in_JavaScript#document.evaluate). e.g. `xpath///*[@id="reject-cookies"]` can find an element whose `id` is 'reject-cookies'.
85
- - If an array of selectors is given, the selectors are applied in array order, with the search scope constrained each time but the first match of the previous selector. e.g. `['#reject-cookies', 'button']` first looks for an element with `id` 'reject-cookies', then looks for a match for `button` _that is a decendant_ of that element.
86
- - If an array of selectors is given, and a selector returns an element that has a `shadowRoot` attribute, the next selector will run within that element's shadow DOM.
84
+ - Strings prefixed with `xpath/` are [Xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) selectors which can locate elements in the page via [`document.evaluate`](https://developer.mozilla.org/en-US/docs/Web/XPath/Introduction_to_using_XPath_in_JavaScript#document.evaluate). e.g. `xpath///*[@id="reject-cookies"]` can find an element whose `id` is 'reject-cookies'.
85
+ - If an array of strings is given, the selectors are applied in array order, with the search scope constrained each time but the first match of the previous selector. e.g. `['#reject-cookies', 'button']` first looks for an element with `id="reject-cookies"`, then looks for a match for `button` _that is a descendant_ of that element.
86
+ **If one of the selectors returns an element that has a `shadowRoot` property, the next selector will run within that element's shadow DOM.** This is the main difference from nested CSS selectors, which do not cross shadow DOM boundaries.
87
+
88
+ For example, consider the following DOM fragment:
89
+ ```html
90
+ <open-shadow-root-element>
91
+ <button>X</button>
92
+ </open-shadow-root-element>
93
+ ```
94
+
95
+ Then `['open-shadow-root-element', 'button']` will find the button, but a usual CSS selector `'open-shadow-root-element button'` will not.
87
96
 
88
97
  ### Element exists
89
98
 
90
- ```json
99
+ ```javascript
91
100
  {
92
- "exists": "selector"
101
+ "exists": ElementSelector
93
102
  }
94
103
  ```
95
104
  Returns true if the given selector matches one or more elements.
96
105
 
97
106
  ### Element visible
98
107
 
99
- ```json
108
+ ```javascript
100
109
  {
101
- "visible": "selector",
110
+ "visible": ElementSelector,
102
111
  "check": "any" | "all" | "none"
103
112
  }
104
113
  ```
105
- Returns true if elements returned matched by "selector" are currently visible on the page. If `check` is `all`, every element must be visible. If `check` is `none`, no element should be visible. Visibility check is a CSS-based heuristic.
114
+ Returns true if elements matched by ElementSelector are currently visible on the page. If `check` is `all`, every element must be visible. If `check` is `none`, no element should be visible. Visibility check is a CSS-based heuristic.
106
115
 
107
116
  ### Wait for element
108
117
 
109
- ```json
118
+ ```javascript
110
119
  {
111
- "waitFor": "selector",
120
+ "waitFor": ElementSelector,
112
121
  "timeout": 1000
113
122
  }
114
123
  ```
@@ -116,9 +125,9 @@ Waits until `selector` exists in the page. After `timeout` ms the step fails.
116
125
 
117
126
  ### Wait for visibility
118
127
 
119
- ```json
128
+ ```javascript
120
129
  {
121
- "waitForVisible": "selector",
130
+ "waitForVisible": ElementSelector,
122
131
  "timeout": 1000,
123
132
  "check": "any" | "all" | "none"
124
133
  }
@@ -126,18 +135,18 @@ Waits until `selector` exists in the page. After `timeout` ms the step fails.
126
135
  Waits until element is visible in the page. After `timeout` ms the step fails.
127
136
 
128
137
  ### Click an element
129
- ```json
138
+ ```javascript
130
139
  {
131
- "click": "selector",
140
+ "click": ElementSelector,
132
141
  "all": true | false,
133
142
  }
134
143
  ```
135
144
  Click on an element returned by `selector`. If `all` is `true`, all matching elements are clicked. If `all` is `false`, only the first returned value is clicked.
136
145
 
137
146
  ### Wait for then click
138
- ```json
147
+ ```javascript
139
148
  {
140
- "waitForThenClick": "selector",
149
+ "waitForThenClick": ElementSelector,
141
150
  "timeout": 1000,
142
151
  "all": true | false
143
152
  }
@@ -145,7 +154,7 @@ Click on an element returned by `selector`. If `all` is `true`, all matching ele
145
154
  Combines `waitFor` and `click`.
146
155
 
147
156
  ### Unconditional wait
148
- ```json
157
+ ```javascript
149
158
  {
150
159
  "wait": 1000,
151
160
  }
@@ -153,17 +162,17 @@ Combines `waitFor` and `click`.
153
162
  Wait for the specified number of milliseconds.
154
163
 
155
164
  ### Hide
156
- ```json
165
+ ```javascript
157
166
  {
158
- "hide": ["selector", ...],
167
+ "hide": "CSS selector",
159
168
  "method": "display" | "opacity"
160
169
  }
161
170
  ```
162
- Hide the elements matched by the selectors. `method` defines how elements are hidden: "display" sets `display: none`, "opacity" sets `opacity: 0`. Method is "display" by default.
171
+ Hide the elements matched by the selectors. `method` defines how elements are hidden: "display" sets `display: none`, "opacity" sets `opacity: 0`. Method is "display" by default. Note that only a single string CSS selector is supported here, not an array.
163
172
 
164
173
  ### Eval
165
174
 
166
- ```json
175
+ ```javascript
167
176
  {
168
177
  "eval": "SNIPPET_ID"
169
178
  }
@@ -173,9 +182,9 @@ Eval rules are not 100% reliable because they can be affected by the page script
173
182
 
174
183
  ### Conditionals
175
184
 
176
- ```json
185
+ ```javascript
177
186
  {
178
- "if": { "exists": "selector" },
187
+ "if": { "exists": ElementSelector },
179
188
  "then": [
180
189
  { "click": ".button1" },
181
190
  { "click": ".button3" }
@@ -191,7 +200,7 @@ The "if" rule is considered successful as long as all rules inside the chosen br
191
200
 
192
201
  ### Any
193
202
 
194
- ```json
203
+ ```javascript
195
204
  {
196
205
  "any": [
197
206
  { "exists": ".button1" },
@@ -200,11 +209,11 @@ The "if" rule is considered successful as long as all rules inside the chosen br
200
209
  }
201
210
  ```
202
211
 
203
- Evaluates a list of steps in order. If any return true (success), then the step exists and returns true. If all steps return false, the `any` step returns false.
212
+ Evaluates a list of steps in order. If any return true (success), then the step returns true. If all steps return false, the `any` step returns false.
204
213
 
205
214
  ### Optional actions
206
215
 
207
- Any rule can include the `"optional": true` to ignore failure.
216
+ All rules can include the `"optional": true` to ignore failure.
208
217
 
209
218
  ## API
210
219
 
@@ -6,6 +6,6 @@
6
6
  "detectPopup": [{ "visible": "footer #footer-root [aria-label=\"Cookie Consent\"]" }],
7
7
  "optIn":
8
8
  [{"click": "footer #footer-root [aria-label=\"Cookie Consent\"] button" }],
9
- "optOut": [{ "hide": ["footer #footer-root [aria-label=\"Cookie Consent\"]"] }]
9
+ "optOut": [{ "hide": "footer #footer-root [aria-label=\"Cookie Consent\"]" }]
10
10
  }
11
11
 
@@ -8,6 +8,6 @@
8
8
  { "click": "button[aria-label=\"Close modal\"]" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["#modal-1 div[data-micromodal-close]"] }
11
+ { "hide": "#modal-1 div[data-micromodal-close]" }
12
12
  ]
13
13
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".altium-privacy-bar" }],
6
6
  "detectPopup": [{ "exists": ".altium-privacy-bar" }],
7
7
  "optIn": [{ "click": "a.altium-privacy-bar__btn" }],
8
- "optOut": [{ "hide": [".altium-privacy-bar"] }]
8
+ "optOut": [{ "hide": ".altium-privacy-bar" }]
9
9
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#consent-tracking" }],
6
6
  "detectPopup": [{ "exists": "#consent-tracking" }],
7
7
  "optIn": [{ "click": "#accept_consent" }],
8
- "optOut": [{ "hide": ["#consent-tracking"] }]
8
+ "optOut": [{ "hide": "#consent-tracking" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "#footer-container ~ div" }],
9
9
  "detectPopup": [{ "visible": "#footer-container > div" }],
10
10
  "optIn": [{"click": "#footer-container ~ div button" }],
11
- "optOut": [{ "hide": ["#footer-container ~ div"] }]
11
+ "optOut": [{ "hide": "#footer-container ~ div" }]
12
12
  }
@@ -3,6 +3,6 @@
3
3
  "cosmetic": true,
4
4
  "detectCmp": [{ "exists": ".gdpr-popup__message" }],
5
5
  "detectPopup": [{ "visible": ".gdpr-popup__message" }],
6
- "optOut": [{ "hide": [".gdpr-popup__message"]}],
6
+ "optOut": [{ "hide": ".gdpr-popup__message"}],
7
7
  "optIn": [{ "click": ".gdpr-popup__message button"}]
8
8
  }
@@ -9,6 +9,6 @@
9
9
  { "click": ".cookie-alert__button button" }
10
10
  ],
11
11
  "optOut": [
12
- { "hide": [".cookie-alert.t-dark"] }
12
+ { "hide": ".cookie-alert.t-dark" }
13
13
  ]
14
14
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "div[aria-label=\"use of cookies on bbb.org\"]" }],
9
9
  "detectPopup": [{ "visible": "div[aria-label=\"use of cookies on bbb.org\"]" }],
10
10
  "optIn": [{ "click": "div[aria-label=\"use of cookies on bbb.org\"] button.bds-button-unstyled span.visually-hidden" }],
11
- "optOut": [{ "hide": ["div[aria-label=\"use of cookies on bbb.org\"]"] }]
11
+ "optOut": [{ "hide": "div[aria-label=\"use of cookies on bbb.org\"]" }]
12
12
  }
@@ -8,6 +8,6 @@
8
8
  { "click": "#btn-cookie-allow" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": ["#html-body #notice-cookie-block", "#notice-cookie"] }
11
+ { "hide": "#html-body #notice-cookie-block, #notice-cookie" }
12
12
  ]
13
13
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": ".cc_banner-wrapper" }],
6
6
  "detectPopup": [{ "visible": ".cc_banner" }],
7
7
  "optIn": [{ "click": ".cc_btn_accept_all" }],
8
- "optOut": [{ "hide": [".cc_banner-wrapper"] }]
8
+ "optOut": [{ "hide": ".cc_banner-wrapper" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "#gdpr-cookie-message" }],
9
9
  "detectPopup": [{ "visible": "#gdpr-cookie-message" }],
10
10
  "optIn": [{ "click": "button#gdpr-cookie-accept" }],
11
- "optOut": [{ "hide": ["#gdpr-cookie-message"] }]
11
+ "optOut": [{ "hide": "#gdpr-cookie-message" }]
12
12
  }
@@ -10,6 +10,6 @@
10
10
  { "click": ".cc-dismiss", "optional": true }
11
11
  ],
12
12
  "optOut": [
13
- { "hide": ["[aria-describedby=\"cookieconsent:desc\"]"] }
13
+ { "hide": "[aria-describedby=\"cookieconsent:desc\"]" }
14
14
  ]
15
15
  }
@@ -5,7 +5,7 @@
5
5
  "detectPopup": [{ "visible": "#cookie-law-info-bar" }],
6
6
  "optIn": [{ "click": "[data-cli_action=\"accept_all\"]" }],
7
7
  "optOut": [
8
- { "hide": ["#cookie-law-info-bar"] },
8
+ { "hide": "#cookie-law-info-bar" },
9
9
  {
10
10
  "eval": "EVAL_COOKIE_LAW_INFO_0"
11
11
  }
@@ -7,5 +7,5 @@
7
7
  ],
8
8
  "detectPopup": [{ "visible": "#cookie-notice" }],
9
9
  "optIn": [{ "click": "#cn-accept-cookie" }],
10
- "optOut": [{ "hide": ["#cookie-notice"] }]
10
+ "optOut": [{ "hide": "#cookie-notice" }]
11
11
  }
@@ -5,7 +5,7 @@
5
5
  "detectPopup": [{ "visible": "#cookie-information-template-wrapper" }],
6
6
  "optIn": [ { "eval": "EVAL_COOKIEINFORMATION_1"} ],
7
7
  "optOut": [
8
- { "hide": ["#cookie-information-template-wrapper"], "comment": "some templates don't hide the banner automatically" },
8
+ { "hide": "#cookie-information-template-wrapper", "comment": "some templates don't hide the banner automatically" },
9
9
  { "eval": "EVAL_COOKIEINFORMATION_0"}
10
10
  ],
11
11
  "test": [
@@ -22,7 +22,7 @@
22
22
  { "waitForThenClick": ".cky-modal [data-cky-tag=detail-save-button]" }
23
23
  ],
24
24
  "else": [
25
- { "hide": [".cky-consent-container,.cky-overlay"] }
25
+ { "hide": ".cky-consent-container,.cky-overlay" }
26
26
  ]
27
27
  }
28
28
  ]
@@ -5,6 +5,6 @@
5
5
  "detectCmp": [{ "exists": "body #modal > div > div[class^=\"_wrapper_\"]" }],
6
6
  "detectPopup": [{ "visible": "body #modal > div > div[class^=\"_wrapper_\"]" }],
7
7
  "optIn": [{"click": "button[aria-label=\"accept cookie policy\"]" }],
8
- "optOut": [{ "hide": ["body #modal > div > div[class^=\"_wrapper_\"]"] }]
8
+ "optOut": [{ "hide": "body #modal > div > div[class^=\"_wrapper_\"]" }]
9
9
  }
10
10
 
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "div[class*=\"CookiePopup__desktopContainer\"]" }],
6
6
  "detectPopup": [{ "visible": "div[class*=\"CookiePopup__desktopContainer\"]" }],
7
7
  "optIn": [{ "click": "div[class*=\"CookiePopup__desktopContainer\"] > button > span" }],
8
- "optOut": [{ "hide": ["div[class*=\"CookiePopup__desktopContainer\"]"] }]
8
+ "optOut": [{ "hide": "div[class*=\"CookiePopup__desktopContainer\"]" }]
9
9
  }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": "div.cookie-footer-container" }],
9
9
  "detectPopup": [{ "visible": "div.cookie-footer-container" }],
10
10
  "optIn": [{ "click": " button.cookie-close-icon" }],
11
- "optOut": [{ "hide": ["div.cookie-footer-container"] }]
11
+ "optOut": [{ "hide": "div.cookie-footer-container" }]
12
12
  }
@@ -9,7 +9,7 @@
9
9
  { "click": ".sp-dsgvo-privacy-btn-accept-all", "all": true }
10
10
  ],
11
11
  "optOut": [
12
- { "hide": [".sp-dsgvo.sp-dsgvo-popup-overlay"] }
12
+ { "hide": ".sp-dsgvo.sp-dsgvo-popup-overlay" }
13
13
  ],
14
14
  "test": [
15
15
  { "eval": "EVAL_DSGVO_0" }
@@ -5,7 +5,7 @@
5
5
  "optIn": [{ "click": ".agree-button" }],
6
6
  "optOut": [
7
7
  { "click": ".decline-button,.eu-cookie-compliance-save-preferences-button", "optional": true },
8
- { "hide": [".eu-cookie-compliance-banner-info", "#sliding-popup"] }
8
+ { "hide": ".eu-cookie-compliance-banner-info, #sliding-popup" }
9
9
  ],
10
10
  "test": [
11
11
  { "eval": "EVAL_EU_COOKIE_COMPLIANCE_0" }
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "optOut": [
16
- { "hide": [".pea_cook_wrapper"] }
16
+ { "hide": ".pea_cook_wrapper" }
17
17
  ],
18
18
  "test": [
19
19
  { "eval": "EVAL_EU_COOKIE_LAW_0" }
@@ -8,5 +8,5 @@
8
8
  "detectCmp": [{ "exists": ".cookie-consent" }],
9
9
  "detectPopup": [{ "visible": ".cookie-consent" }],
10
10
  "optIn": [{ "click": ".cookie-consent button.consent-btn" }],
11
- "optOut": [{ "hide": [".cookie-consent"] }]
11
+ "optOut": [{ "hide": ".cookie-consent" }]
12
12
  }
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#js-cookie-banner,.js-cookie-banner,.cookie-banner,#cookie-banner" }],
6
6
  "detectPopup": [{ "visible": "#js-cookie-banner,.js-cookie-banner,.cookie-banner,#cookie-banner" }],
7
7
  "optIn": [],
8
- "optOut": [{ "hide": ["#js-cookie-banner,.js-cookie-banner,.cookie-banner,#cookie-banner"] }]
8
+ "optOut": [{ "hide": "#js-cookie-banner,.js-cookie-banner,.cookie-banner,#cookie-banner" }]
9
9
  }
@@ -9,7 +9,7 @@
9
9
  "click": "#manageCookie"
10
10
  },
11
11
  {
12
- "hide": [".cookieSettingsModal"]
12
+ "hide": ".cookieSettingsModal"
13
13
  },
14
14
  {
15
15
  "waitFor": "#AOCookieToggle"
@@ -5,5 +5,5 @@
5
5
  "detectCmp": [{ "exists": "#CookiePrivacyNotice" }],
6
6
  "detectPopup": [{ "visible": "#CookiePrivacyNotice" }],
7
7
  "optIn": [{ "click": "#CookiePrivacyNotice button[data-gnav-element-name=CookiePrivacyNoticeOk]" }],
8
- "optOut": [{ "hide": ["#CookiePrivacyNotice"] }]
8
+ "optOut": [{ "hide": "#CookiePrivacyNotice" }]
9
9
  }
@@ -8,6 +8,6 @@
8
8
  { "click": "#_pcookie" }
9
9
  ],
10
10
  "optOut": [
11
- { "hide": [".pop-cookie"] }
11
+ { "hide": ".pop-cookie" }
12
12
  ]
13
13
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "iWink",
3
+ "prehideSelectors": ["body.cookies-request #cookie-bar"],
4
+ "detectCmp": [
5
+ { "exists": "body.cookies-request #cookie-bar" }
6
+ ],
7
+ "detectPopup": [
8
+ { "visible": "body.cookies-request #cookie-bar" }
9
+ ],
10
+ "optIn": [
11
+ { "waitForThenClick": "body.cookies-request #cookie-bar .allow-cookies" }
12
+ ],
13
+ "optOut": [
14
+ { "waitForThenClick": "body.cookies-request #cookie-bar .disallow-cookies" }
15
+ ],
16
+ "test": [
17
+ {"eval": "EVAL_IWINK_TEST"}
18
+ ]
19
+ }
@@ -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
  }