@duckduckgo/autoconsent 6.4.1 → 6.4.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ # v6.4.3 (Mon Dec 04 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Cookiebot fixes [#304](https://github.com/duckduckgo/autoconsent/pull/304) ([@muodov](https://github.com/muodov))
6
+
7
+ #### Authors: 1
8
+
9
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
10
+
11
+ ---
12
+
13
+ # v6.4.2 (Mon Dec 04 2023)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Add a rule for CookieYes [#306](https://github.com/duckduckgo/autoconsent/pull/306) ([@muodov](https://github.com/muodov))
18
+ - Add a rule for yahoo pop-up [#305](https://github.com/duckduckgo/autoconsent/pull/305) ([@muodov](https://github.com/muodov))
19
+
20
+ #### 🔩 Dependency Updates
21
+
22
+ - Bump the dev-dependencies group with 3 updates [#303](https://github.com/duckduckgo/autoconsent/pull/303) ([@dependabot[bot]](https://github.com/dependabot[bot]))
23
+
24
+ #### Authors: 2
25
+
26
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
27
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
28
+
29
+ ---
30
+
1
31
  # v6.4.1 (Mon Nov 27 2023)
2
32
 
3
33
  #### 🐛 Bug Fix
@@ -220,6 +220,7 @@
220
220
  }
221
221
  break;
222
222
  case "selfTestResult":
223
+ enableLogs && console.log(`Self-test result ${msg.result}`);
223
224
  if (msg.result) {
224
225
  await showOptOutStatus(tabId, "verified", msg.cmp);
225
226
  }
@@ -631,10 +631,11 @@
631
631
  EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
632
632
  EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
633
633
  EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
634
- EVAL_COOKIEBOT_1: () => window.CookieConsent.hasResponse !== true,
635
- EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog.submitConsent(),
636
- EVAL_COOKIEBOT_3: () => endCookieProcess(),
637
- EVAL_COOKIEBOT_4: () => window.CookieConsent.declined === true,
634
+ EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
635
+ EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
636
+ EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
637
+ EVAL_COOKIEBOT_4: () => window.Cookiebot.hide() || true,
638
+ EVAL_COOKIEBOT_5: () => window.Cookiebot.declined === true,
638
639
  EVAL_KLARO_1: () => klaro.getManager().config.services.every((c) => c.required || !klaro.getManager().consents[c.name]),
639
640
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
640
641
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
@@ -665,6 +666,7 @@
665
666
  EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
666
667
  EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
667
668
  EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
669
+ EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
668
670
  EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
669
671
  EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
670
672
  EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
@@ -772,6 +774,7 @@
772
774
  return Promise.resolve(result);
773
775
  }
774
776
  const snippetSrc = getFunctionBody(snippet);
777
+ enableLogs && console.log("async eval:", snippetId, snippetSrc);
775
778
  return requestEval(snippetSrc).catch((e) => {
776
779
  enableLogs && console.error("error evaluating rule", snippetId, e);
777
780
  return false;
@@ -1175,7 +1178,7 @@
1175
1178
  constructor() {
1176
1179
  super(...arguments);
1177
1180
  this.name = "Cybotcookiebot";
1178
- this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
1181
+ this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
1179
1182
  }
1180
1183
  get hasSelfTest() {
1181
1184
  return true;
@@ -1187,44 +1190,19 @@
1187
1190
  return false;
1188
1191
  }
1189
1192
  async detectCmp() {
1190
- return elementExists("#CybotCookiebotDialogBodyLevelButtonPreferences");
1193
+ return await this.mainWorldEval("EVAL_COOKIEBOT_1");
1191
1194
  }
1192
1195
  async detectPopup() {
1193
- return elementExists("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner");
1196
+ return await waitFor(() => {
1197
+ return this.mainWorldEval("EVAL_COOKIEBOT_2");
1198
+ }, 10, 500);
1194
1199
  }
1195
1200
  async optOut() {
1196
- if (click(".cookie-alert-extended-detail-link")) {
1197
- await waitForElement(".cookie-alert-configuration", 2e3);
1198
- click(".cookie-alert-configuration-input:checked", true);
1199
- click(".cookie-alert-extended-button-secondary");
1200
- return true;
1201
- }
1202
- if (elementExists("#dtcookie-container")) {
1203
- return click(".h-dtcookie-decline");
1204
- }
1205
- if (click(".cookiebot__button--settings")) {
1206
- return true;
1207
- }
1208
- if (click("#CybotCookiebotDialogBodyButtonDecline")) {
1209
- return true;
1210
- }
1211
- click(".cookiebanner__link--details");
1212
- click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
1213
- click("#CybotCookiebotDialogBodyButtonDecline");
1214
- click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
1215
- if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
1216
- click("#CybotCookiebotDialogBodyButtonAcceptSelected");
1217
- } else {
1218
- click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
1219
- }
1220
- if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
1221
- await this.mainWorldEval("EVAL_COOKIEBOT_2");
1222
- await wait(500);
1223
- }
1224
- if (elementExists("#cb-confirmedSettings")) {
1225
- await this.mainWorldEval("EVAL_COOKIEBOT_3");
1226
- }
1227
- return true;
1201
+ await wait(500);
1202
+ let res = await this.mainWorldEval("EVAL_COOKIEBOT_3");
1203
+ await wait(500);
1204
+ res = res && await this.mainWorldEval("EVAL_COOKIEBOT_4");
1205
+ return res;
1228
1206
  }
1229
1207
  async optIn() {
1230
1208
  if (elementExists("#dtcookie-container")) {
@@ -1236,7 +1214,8 @@
1236
1214
  return true;
1237
1215
  }
1238
1216
  async test() {
1239
- return this.mainWorldEval("EVAL_COOKIEBOT_4");
1217
+ await wait(500);
1218
+ return await this.mainWorldEval("EVAL_COOKIEBOT_5");
1240
1219
  }
1241
1220
  };
1242
1221
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2023.11.20",
4
+ "version": "2023.12.4",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -1496,6 +1496,74 @@
1496
1496
  }
1497
1497
  ]
1498
1498
  },
1499
+ {
1500
+ "name": "cookieyes",
1501
+ "prehideSelectors": [
1502
+ ".cky-overlay,.cky-consent-container"
1503
+ ],
1504
+ "detectCmp": [
1505
+ {
1506
+ "exists": ".cky-consent-container"
1507
+ }
1508
+ ],
1509
+ "detectPopup": [
1510
+ {
1511
+ "visible": ".cky-consent-container"
1512
+ }
1513
+ ],
1514
+ "optIn": [
1515
+ {
1516
+ "waitForThenClick": ".cky-consent-container [data-cky-tag=accept-button]"
1517
+ }
1518
+ ],
1519
+ "optOut": [
1520
+ {
1521
+ "if": {
1522
+ "exists": ".cky-consent-container [data-cky-tag=reject-button]"
1523
+ },
1524
+ "then": [
1525
+ {
1526
+ "waitForThenClick": ".cky-consent-container [data-cky-tag=reject-button]"
1527
+ }
1528
+ ],
1529
+ "else": [
1530
+ {
1531
+ "if": {
1532
+ "exists": ".cky-consent-container [data-cky-tag=settings-button]"
1533
+ },
1534
+ "then": [
1535
+ {
1536
+ "click": ".cky-consent-container [data-cky-tag=settings-button]"
1537
+ },
1538
+ {
1539
+ "waitFor": ".cky-modal-open input[type=checkbox]"
1540
+ },
1541
+ {
1542
+ "click": ".cky-modal-open input[type=checkbox]:checked",
1543
+ "all": true,
1544
+ "optional": true
1545
+ },
1546
+ {
1547
+ "waitForThenClick": ".cky-modal [data-cky-tag=detail-save-button]"
1548
+ }
1549
+ ],
1550
+ "else": [
1551
+ {
1552
+ "hide": [
1553
+ ".cky-consent-container,.cky-overlay"
1554
+ ]
1555
+ }
1556
+ ]
1557
+ }
1558
+ ]
1559
+ }
1560
+ ],
1561
+ "test": [
1562
+ {
1563
+ "eval": "EVAL_COOKIEYES_0"
1564
+ }
1565
+ ]
1566
+ },
1499
1567
  {
1500
1568
  "name": "corona-in-zahlen.de",
1501
1569
  "prehideSelectors": [
@@ -5193,6 +5261,35 @@
5193
5261
  }
5194
5262
  ]
5195
5263
  },
5264
+ {
5265
+ "name": "Yahoo",
5266
+ "runContext": {
5267
+ "urlPattern": "^https://consent\\.yahoo\\.com/v2/"
5268
+ },
5269
+ "prehideSelectors": [
5270
+ "#reject-all"
5271
+ ],
5272
+ "detectCmp": [
5273
+ {
5274
+ "exists": "#consent-page"
5275
+ }
5276
+ ],
5277
+ "detectPopup": [
5278
+ {
5279
+ "visible": "#consent-page"
5280
+ }
5281
+ ],
5282
+ "optIn": [
5283
+ {
5284
+ "waitForThenClick": "#consent-page button[value=agree]"
5285
+ }
5286
+ ],
5287
+ "optOut": [
5288
+ {
5289
+ "waitForThenClick": "#consent-page button[value=reject]"
5290
+ }
5291
+ ]
5292
+ },
5196
5293
  {
5197
5294
  "name": "youporn.com",
5198
5295
  "cosmetic": true,
@@ -220,6 +220,7 @@
220
220
  }
221
221
  break;
222
222
  case "selfTestResult":
223
+ enableLogs && console.log(`Self-test result ${msg.result}`);
223
224
  if (msg.result) {
224
225
  await showOptOutStatus(tabId, "verified", msg.cmp);
225
226
  }
@@ -631,10 +631,11 @@
631
631
  EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
632
632
  EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
633
633
  EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
634
- EVAL_COOKIEBOT_1: () => window.CookieConsent.hasResponse !== true,
635
- EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog.submitConsent(),
636
- EVAL_COOKIEBOT_3: () => endCookieProcess(),
637
- EVAL_COOKIEBOT_4: () => window.CookieConsent.declined === true,
634
+ EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
635
+ EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
636
+ EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
637
+ EVAL_COOKIEBOT_4: () => window.Cookiebot.hide() || true,
638
+ EVAL_COOKIEBOT_5: () => window.Cookiebot.declined === true,
638
639
  EVAL_KLARO_1: () => klaro.getManager().config.services.every((c) => c.required || !klaro.getManager().consents[c.name]),
639
640
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
640
641
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
@@ -665,6 +666,7 @@
665
666
  EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
666
667
  EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
667
668
  EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
669
+ EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
668
670
  EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
669
671
  EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
670
672
  EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
@@ -772,6 +774,7 @@
772
774
  return Promise.resolve(result);
773
775
  }
774
776
  const snippetSrc = getFunctionBody(snippet);
777
+ enableLogs && console.log("async eval:", snippetId, snippetSrc);
775
778
  return requestEval(snippetSrc).catch((e) => {
776
779
  enableLogs && console.error("error evaluating rule", snippetId, e);
777
780
  return false;
@@ -1175,7 +1178,7 @@
1175
1178
  constructor() {
1176
1179
  super(...arguments);
1177
1180
  this.name = "Cybotcookiebot";
1178
- this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
1181
+ this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
1179
1182
  }
1180
1183
  get hasSelfTest() {
1181
1184
  return true;
@@ -1187,44 +1190,19 @@
1187
1190
  return false;
1188
1191
  }
1189
1192
  async detectCmp() {
1190
- return elementExists("#CybotCookiebotDialogBodyLevelButtonPreferences");
1193
+ return await this.mainWorldEval("EVAL_COOKIEBOT_1");
1191
1194
  }
1192
1195
  async detectPopup() {
1193
- return elementExists("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner");
1196
+ return await waitFor(() => {
1197
+ return this.mainWorldEval("EVAL_COOKIEBOT_2");
1198
+ }, 10, 500);
1194
1199
  }
1195
1200
  async optOut() {
1196
- if (click(".cookie-alert-extended-detail-link")) {
1197
- await waitForElement(".cookie-alert-configuration", 2e3);
1198
- click(".cookie-alert-configuration-input:checked", true);
1199
- click(".cookie-alert-extended-button-secondary");
1200
- return true;
1201
- }
1202
- if (elementExists("#dtcookie-container")) {
1203
- return click(".h-dtcookie-decline");
1204
- }
1205
- if (click(".cookiebot__button--settings")) {
1206
- return true;
1207
- }
1208
- if (click("#CybotCookiebotDialogBodyButtonDecline")) {
1209
- return true;
1210
- }
1211
- click(".cookiebanner__link--details");
1212
- click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
1213
- click("#CybotCookiebotDialogBodyButtonDecline");
1214
- click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
1215
- if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
1216
- click("#CybotCookiebotDialogBodyButtonAcceptSelected");
1217
- } else {
1218
- click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
1219
- }
1220
- if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
1221
- await this.mainWorldEval("EVAL_COOKIEBOT_2");
1222
- await wait(500);
1223
- }
1224
- if (elementExists("#cb-confirmedSettings")) {
1225
- await this.mainWorldEval("EVAL_COOKIEBOT_3");
1226
- }
1227
- return true;
1201
+ await wait(500);
1202
+ let res = await this.mainWorldEval("EVAL_COOKIEBOT_3");
1203
+ await wait(500);
1204
+ res = res && await this.mainWorldEval("EVAL_COOKIEBOT_4");
1205
+ return res;
1228
1206
  }
1229
1207
  async optIn() {
1230
1208
  if (elementExists("#dtcookie-container")) {
@@ -1236,7 +1214,8 @@
1236
1214
  return true;
1237
1215
  }
1238
1216
  async test() {
1239
- return this.mainWorldEval("EVAL_COOKIEBOT_4");
1217
+ await wait(500);
1218
+ return await this.mainWorldEval("EVAL_COOKIEBOT_5");
1240
1219
  }
1241
1220
  };
1242
1221
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2023.11.20",
4
+ "version": "2023.12.4",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -1496,6 +1496,74 @@
1496
1496
  }
1497
1497
  ]
1498
1498
  },
1499
+ {
1500
+ "name": "cookieyes",
1501
+ "prehideSelectors": [
1502
+ ".cky-overlay,.cky-consent-container"
1503
+ ],
1504
+ "detectCmp": [
1505
+ {
1506
+ "exists": ".cky-consent-container"
1507
+ }
1508
+ ],
1509
+ "detectPopup": [
1510
+ {
1511
+ "visible": ".cky-consent-container"
1512
+ }
1513
+ ],
1514
+ "optIn": [
1515
+ {
1516
+ "waitForThenClick": ".cky-consent-container [data-cky-tag=accept-button]"
1517
+ }
1518
+ ],
1519
+ "optOut": [
1520
+ {
1521
+ "if": {
1522
+ "exists": ".cky-consent-container [data-cky-tag=reject-button]"
1523
+ },
1524
+ "then": [
1525
+ {
1526
+ "waitForThenClick": ".cky-consent-container [data-cky-tag=reject-button]"
1527
+ }
1528
+ ],
1529
+ "else": [
1530
+ {
1531
+ "if": {
1532
+ "exists": ".cky-consent-container [data-cky-tag=settings-button]"
1533
+ },
1534
+ "then": [
1535
+ {
1536
+ "click": ".cky-consent-container [data-cky-tag=settings-button]"
1537
+ },
1538
+ {
1539
+ "waitFor": ".cky-modal-open input[type=checkbox]"
1540
+ },
1541
+ {
1542
+ "click": ".cky-modal-open input[type=checkbox]:checked",
1543
+ "all": true,
1544
+ "optional": true
1545
+ },
1546
+ {
1547
+ "waitForThenClick": ".cky-modal [data-cky-tag=detail-save-button]"
1548
+ }
1549
+ ],
1550
+ "else": [
1551
+ {
1552
+ "hide": [
1553
+ ".cky-consent-container,.cky-overlay"
1554
+ ]
1555
+ }
1556
+ ]
1557
+ }
1558
+ ]
1559
+ }
1560
+ ],
1561
+ "test": [
1562
+ {
1563
+ "eval": "EVAL_COOKIEYES_0"
1564
+ }
1565
+ ]
1566
+ },
1499
1567
  {
1500
1568
  "name": "corona-in-zahlen.de",
1501
1569
  "prehideSelectors": [
@@ -5193,6 +5261,35 @@
5193
5261
  }
5194
5262
  ]
5195
5263
  },
5264
+ {
5265
+ "name": "Yahoo",
5266
+ "runContext": {
5267
+ "urlPattern": "^https://consent\\.yahoo\\.com/v2/"
5268
+ },
5269
+ "prehideSelectors": [
5270
+ "#reject-all"
5271
+ ],
5272
+ "detectCmp": [
5273
+ {
5274
+ "exists": "#consent-page"
5275
+ }
5276
+ ],
5277
+ "detectPopup": [
5278
+ {
5279
+ "visible": "#consent-page"
5280
+ }
5281
+ ],
5282
+ "optIn": [
5283
+ {
5284
+ "waitForThenClick": "#consent-page button[value=agree]"
5285
+ }
5286
+ ],
5287
+ "optOut": [
5288
+ {
5289
+ "waitForThenClick": "#consent-page button[value=reject]"
5290
+ }
5291
+ ]
5292
+ },
5196
5293
  {
5197
5294
  "name": "youporn.com",
5198
5295
  "cosmetic": true,
@@ -654,10 +654,11 @@ var snippets = {
654
654
  EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
655
655
  EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
656
656
  EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
657
- EVAL_COOKIEBOT_1: () => window.CookieConsent.hasResponse !== true,
658
- EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog.submitConsent(),
659
- EVAL_COOKIEBOT_3: () => endCookieProcess(),
660
- EVAL_COOKIEBOT_4: () => window.CookieConsent.declined === true,
657
+ EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
658
+ EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
659
+ EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
660
+ EVAL_COOKIEBOT_4: () => window.Cookiebot.hide() || true,
661
+ EVAL_COOKIEBOT_5: () => window.Cookiebot.declined === true,
661
662
  EVAL_KLARO_1: () => klaro.getManager().config.services.every((c) => c.required || !klaro.getManager().consents[c.name]),
662
663
  EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
663
664
  EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
@@ -688,6 +689,7 @@ var snippets = {
688
689
  EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
689
690
  EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
690
691
  EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
692
+ EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
691
693
  EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
692
694
  EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
693
695
  EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
@@ -795,6 +797,7 @@ var AutoConsentCMPBase = class {
795
797
  return Promise.resolve(result);
796
798
  }
797
799
  const snippetSrc = getFunctionBody(snippet);
800
+ enableLogs && console.log("async eval:", snippetId, snippetSrc);
798
801
  return requestEval(snippetSrc).catch((e) => {
799
802
  enableLogs && console.error("error evaluating rule", snippetId, e);
800
803
  return false;
@@ -1198,7 +1201,7 @@ var Cookiebot = class extends AutoConsentCMPBase {
1198
1201
  constructor() {
1199
1202
  super(...arguments);
1200
1203
  this.name = "Cybotcookiebot";
1201
- this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
1204
+ this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
1202
1205
  }
1203
1206
  get hasSelfTest() {
1204
1207
  return true;
@@ -1210,44 +1213,19 @@ var Cookiebot = class extends AutoConsentCMPBase {
1210
1213
  return false;
1211
1214
  }
1212
1215
  async detectCmp() {
1213
- return elementExists("#CybotCookiebotDialogBodyLevelButtonPreferences");
1216
+ return await this.mainWorldEval("EVAL_COOKIEBOT_1");
1214
1217
  }
1215
1218
  async detectPopup() {
1216
- return elementExists("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner");
1219
+ return await waitFor(() => {
1220
+ return this.mainWorldEval("EVAL_COOKIEBOT_2");
1221
+ }, 10, 500);
1217
1222
  }
1218
1223
  async optOut() {
1219
- if (click(".cookie-alert-extended-detail-link")) {
1220
- await waitForElement(".cookie-alert-configuration", 2e3);
1221
- click(".cookie-alert-configuration-input:checked", true);
1222
- click(".cookie-alert-extended-button-secondary");
1223
- return true;
1224
- }
1225
- if (elementExists("#dtcookie-container")) {
1226
- return click(".h-dtcookie-decline");
1227
- }
1228
- if (click(".cookiebot__button--settings")) {
1229
- return true;
1230
- }
1231
- if (click("#CybotCookiebotDialogBodyButtonDecline")) {
1232
- return true;
1233
- }
1234
- click(".cookiebanner__link--details");
1235
- click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
1236
- click("#CybotCookiebotDialogBodyButtonDecline");
1237
- click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
1238
- if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
1239
- click("#CybotCookiebotDialogBodyButtonAcceptSelected");
1240
- } else {
1241
- click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
1242
- }
1243
- if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
1244
- await this.mainWorldEval("EVAL_COOKIEBOT_2");
1245
- await wait(500);
1246
- }
1247
- if (elementExists("#cb-confirmedSettings")) {
1248
- await this.mainWorldEval("EVAL_COOKIEBOT_3");
1249
- }
1250
- return true;
1224
+ await wait(500);
1225
+ let res = await this.mainWorldEval("EVAL_COOKIEBOT_3");
1226
+ await wait(500);
1227
+ res = res && await this.mainWorldEval("EVAL_COOKIEBOT_4");
1228
+ return res;
1251
1229
  }
1252
1230
  async optIn() {
1253
1231
  if (elementExists("#dtcookie-container")) {
@@ -1259,7 +1237,8 @@ var Cookiebot = class extends AutoConsentCMPBase {
1259
1237
  return true;
1260
1238
  }
1261
1239
  async test() {
1262
- return this.mainWorldEval("EVAL_COOKIEBOT_4");
1240
+ await wait(500);
1241
+ return await this.mainWorldEval("EVAL_COOKIEBOT_5");
1263
1242
  }
1264
1243
  };
1265
1244