@duckduckgo/autoconsent 6.4.2 → 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 +12 -0
- package/dist/addon-firefox/background.bundle.js +1 -0
- package/dist/addon-firefox/content.bundle.js +18 -40
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-mv3/background.bundle.js +1 -0
- package/dist/addon-mv3/content.bundle.js +18 -40
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/autoconsent.cjs.js +18 -40
- package/dist/autoconsent.esm.js +18 -40
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/base.ts +1 -0
- package/lib/cmps/cookiebot.ts +14 -50
- package/lib/eval-snippets.ts +5 -4
- package/package.json +2 -2
- package/tests/cookiebot.spec.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
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
|
+
|
|
1
13
|
# v6.4.2 (Mon Dec 04 2023)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
|
@@ -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.
|
|
635
|
-
EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog
|
|
636
|
-
EVAL_COOKIEBOT_3: () =>
|
|
637
|
-
EVAL_COOKIEBOT_4: () => window.
|
|
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",
|
|
@@ -773,6 +774,7 @@
|
|
|
773
774
|
return Promise.resolve(result);
|
|
774
775
|
}
|
|
775
776
|
const snippetSrc = getFunctionBody(snippet);
|
|
777
|
+
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
776
778
|
return requestEval(snippetSrc).catch((e) => {
|
|
777
779
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
778
780
|
return false;
|
|
@@ -1176,7 +1178,7 @@
|
|
|
1176
1178
|
constructor() {
|
|
1177
1179
|
super(...arguments);
|
|
1178
1180
|
this.name = "Cybotcookiebot";
|
|
1179
|
-
this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
|
|
1181
|
+
this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
|
|
1180
1182
|
}
|
|
1181
1183
|
get hasSelfTest() {
|
|
1182
1184
|
return true;
|
|
@@ -1188,44 +1190,19 @@
|
|
|
1188
1190
|
return false;
|
|
1189
1191
|
}
|
|
1190
1192
|
async detectCmp() {
|
|
1191
|
-
return
|
|
1193
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_1");
|
|
1192
1194
|
}
|
|
1193
1195
|
async detectPopup() {
|
|
1194
|
-
return
|
|
1196
|
+
return await waitFor(() => {
|
|
1197
|
+
return this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1198
|
+
}, 10, 500);
|
|
1195
1199
|
}
|
|
1196
1200
|
async optOut() {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1203
|
-
if (elementExists("#dtcookie-container")) {
|
|
1204
|
-
return click(".h-dtcookie-decline");
|
|
1205
|
-
}
|
|
1206
|
-
if (click(".cookiebot__button--settings")) {
|
|
1207
|
-
return true;
|
|
1208
|
-
}
|
|
1209
|
-
if (click("#CybotCookiebotDialogBodyButtonDecline")) {
|
|
1210
|
-
return true;
|
|
1211
|
-
}
|
|
1212
|
-
click(".cookiebanner__link--details");
|
|
1213
|
-
click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
|
|
1214
|
-
click("#CybotCookiebotDialogBodyButtonDecline");
|
|
1215
|
-
click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
|
|
1216
|
-
if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
|
|
1217
|
-
click("#CybotCookiebotDialogBodyButtonAcceptSelected");
|
|
1218
|
-
} else {
|
|
1219
|
-
click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
|
|
1220
|
-
}
|
|
1221
|
-
if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
|
|
1222
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1223
|
-
await wait(500);
|
|
1224
|
-
}
|
|
1225
|
-
if (elementExists("#cb-confirmedSettings")) {
|
|
1226
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1227
|
-
}
|
|
1228
|
-
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;
|
|
1229
1206
|
}
|
|
1230
1207
|
async optIn() {
|
|
1231
1208
|
if (elementExists("#dtcookie-container")) {
|
|
@@ -1237,7 +1214,8 @@
|
|
|
1237
1214
|
return true;
|
|
1238
1215
|
}
|
|
1239
1216
|
async test() {
|
|
1240
|
-
|
|
1217
|
+
await wait(500);
|
|
1218
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_5");
|
|
1241
1219
|
}
|
|
1242
1220
|
};
|
|
1243
1221
|
|
|
@@ -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.
|
|
635
|
-
EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog
|
|
636
|
-
EVAL_COOKIEBOT_3: () =>
|
|
637
|
-
EVAL_COOKIEBOT_4: () => window.
|
|
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",
|
|
@@ -773,6 +774,7 @@
|
|
|
773
774
|
return Promise.resolve(result);
|
|
774
775
|
}
|
|
775
776
|
const snippetSrc = getFunctionBody(snippet);
|
|
777
|
+
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
776
778
|
return requestEval(snippetSrc).catch((e) => {
|
|
777
779
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
778
780
|
return false;
|
|
@@ -1176,7 +1178,7 @@
|
|
|
1176
1178
|
constructor() {
|
|
1177
1179
|
super(...arguments);
|
|
1178
1180
|
this.name = "Cybotcookiebot";
|
|
1179
|
-
this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
|
|
1181
|
+
this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
|
|
1180
1182
|
}
|
|
1181
1183
|
get hasSelfTest() {
|
|
1182
1184
|
return true;
|
|
@@ -1188,44 +1190,19 @@
|
|
|
1188
1190
|
return false;
|
|
1189
1191
|
}
|
|
1190
1192
|
async detectCmp() {
|
|
1191
|
-
return
|
|
1193
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_1");
|
|
1192
1194
|
}
|
|
1193
1195
|
async detectPopup() {
|
|
1194
|
-
return
|
|
1196
|
+
return await waitFor(() => {
|
|
1197
|
+
return this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1198
|
+
}, 10, 500);
|
|
1195
1199
|
}
|
|
1196
1200
|
async optOut() {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1203
|
-
if (elementExists("#dtcookie-container")) {
|
|
1204
|
-
return click(".h-dtcookie-decline");
|
|
1205
|
-
}
|
|
1206
|
-
if (click(".cookiebot__button--settings")) {
|
|
1207
|
-
return true;
|
|
1208
|
-
}
|
|
1209
|
-
if (click("#CybotCookiebotDialogBodyButtonDecline")) {
|
|
1210
|
-
return true;
|
|
1211
|
-
}
|
|
1212
|
-
click(".cookiebanner__link--details");
|
|
1213
|
-
click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
|
|
1214
|
-
click("#CybotCookiebotDialogBodyButtonDecline");
|
|
1215
|
-
click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
|
|
1216
|
-
if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
|
|
1217
|
-
click("#CybotCookiebotDialogBodyButtonAcceptSelected");
|
|
1218
|
-
} else {
|
|
1219
|
-
click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
|
|
1220
|
-
}
|
|
1221
|
-
if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
|
|
1222
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1223
|
-
await wait(500);
|
|
1224
|
-
}
|
|
1225
|
-
if (elementExists("#cb-confirmedSettings")) {
|
|
1226
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1227
|
-
}
|
|
1228
|
-
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;
|
|
1229
1206
|
}
|
|
1230
1207
|
async optIn() {
|
|
1231
1208
|
if (elementExists("#dtcookie-container")) {
|
|
@@ -1237,7 +1214,8 @@
|
|
|
1237
1214
|
return true;
|
|
1238
1215
|
}
|
|
1239
1216
|
async test() {
|
|
1240
|
-
|
|
1217
|
+
await wait(500);
|
|
1218
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_5");
|
|
1241
1219
|
}
|
|
1242
1220
|
};
|
|
1243
1221
|
|
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -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.
|
|
658
|
-
EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog
|
|
659
|
-
EVAL_COOKIEBOT_3: () =>
|
|
660
|
-
EVAL_COOKIEBOT_4: () => window.
|
|
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",
|
|
@@ -796,6 +797,7 @@ var AutoConsentCMPBase = class {
|
|
|
796
797
|
return Promise.resolve(result);
|
|
797
798
|
}
|
|
798
799
|
const snippetSrc = getFunctionBody(snippet);
|
|
800
|
+
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
799
801
|
return requestEval(snippetSrc).catch((e) => {
|
|
800
802
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
801
803
|
return false;
|
|
@@ -1199,7 +1201,7 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1199
1201
|
constructor() {
|
|
1200
1202
|
super(...arguments);
|
|
1201
1203
|
this.name = "Cybotcookiebot";
|
|
1202
|
-
this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
|
|
1204
|
+
this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
|
|
1203
1205
|
}
|
|
1204
1206
|
get hasSelfTest() {
|
|
1205
1207
|
return true;
|
|
@@ -1211,44 +1213,19 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1211
1213
|
return false;
|
|
1212
1214
|
}
|
|
1213
1215
|
async detectCmp() {
|
|
1214
|
-
return
|
|
1216
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_1");
|
|
1215
1217
|
}
|
|
1216
1218
|
async detectPopup() {
|
|
1217
|
-
return
|
|
1219
|
+
return await waitFor(() => {
|
|
1220
|
+
return this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1221
|
+
}, 10, 500);
|
|
1218
1222
|
}
|
|
1219
1223
|
async optOut() {
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
|
-
if (elementExists("#dtcookie-container")) {
|
|
1227
|
-
return click(".h-dtcookie-decline");
|
|
1228
|
-
}
|
|
1229
|
-
if (click(".cookiebot__button--settings")) {
|
|
1230
|
-
return true;
|
|
1231
|
-
}
|
|
1232
|
-
if (click("#CybotCookiebotDialogBodyButtonDecline")) {
|
|
1233
|
-
return true;
|
|
1234
|
-
}
|
|
1235
|
-
click(".cookiebanner__link--details");
|
|
1236
|
-
click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
|
|
1237
|
-
click("#CybotCookiebotDialogBodyButtonDecline");
|
|
1238
|
-
click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
|
|
1239
|
-
if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
|
|
1240
|
-
click("#CybotCookiebotDialogBodyButtonAcceptSelected");
|
|
1241
|
-
} else {
|
|
1242
|
-
click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
|
|
1243
|
-
}
|
|
1244
|
-
if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
|
|
1245
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1246
|
-
await wait(500);
|
|
1247
|
-
}
|
|
1248
|
-
if (elementExists("#cb-confirmedSettings")) {
|
|
1249
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1250
|
-
}
|
|
1251
|
-
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;
|
|
1252
1229
|
}
|
|
1253
1230
|
async optIn() {
|
|
1254
1231
|
if (elementExists("#dtcookie-container")) {
|
|
@@ -1260,7 +1237,8 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1260
1237
|
return true;
|
|
1261
1238
|
}
|
|
1262
1239
|
async test() {
|
|
1263
|
-
|
|
1240
|
+
await wait(500);
|
|
1241
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_5");
|
|
1264
1242
|
}
|
|
1265
1243
|
};
|
|
1266
1244
|
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -629,10 +629,11 @@ var snippets = {
|
|
|
629
629
|
EVAL_CONSENTMANAGER_3: () => __cmp("setConsent", 0),
|
|
630
630
|
EVAL_CONSENTMANAGER_4: () => __cmp("setConsent", 1),
|
|
631
631
|
EVAL_CONSENTMANAGER_5: () => __cmp("consentStatus").userChoiceExists,
|
|
632
|
-
EVAL_COOKIEBOT_1: () => window.
|
|
633
|
-
EVAL_COOKIEBOT_2: () => window.Cookiebot.dialog
|
|
634
|
-
EVAL_COOKIEBOT_3: () =>
|
|
635
|
-
EVAL_COOKIEBOT_4: () => window.
|
|
632
|
+
EVAL_COOKIEBOT_1: () => !!window.Cookiebot,
|
|
633
|
+
EVAL_COOKIEBOT_2: () => !window.Cookiebot.hasResponse && window.Cookiebot.dialog?.visible === true,
|
|
634
|
+
EVAL_COOKIEBOT_3: () => window.Cookiebot.withdraw() || true,
|
|
635
|
+
EVAL_COOKIEBOT_4: () => window.Cookiebot.hide() || true,
|
|
636
|
+
EVAL_COOKIEBOT_5: () => window.Cookiebot.declined === true,
|
|
636
637
|
EVAL_KLARO_1: () => klaro.getManager().config.services.every((c) => c.required || !klaro.getManager().consents[c.name]),
|
|
637
638
|
EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(",").filter((s) => s.length > 0).length <= 1,
|
|
638
639
|
EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === "0",
|
|
@@ -771,6 +772,7 @@ var AutoConsentCMPBase = class {
|
|
|
771
772
|
return Promise.resolve(result);
|
|
772
773
|
}
|
|
773
774
|
const snippetSrc = getFunctionBody(snippet);
|
|
775
|
+
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
774
776
|
return requestEval(snippetSrc).catch((e) => {
|
|
775
777
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
776
778
|
return false;
|
|
@@ -1174,7 +1176,7 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1174
1176
|
constructor() {
|
|
1175
1177
|
super(...arguments);
|
|
1176
1178
|
this.name = "Cybotcookiebot";
|
|
1177
|
-
this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
|
|
1179
|
+
this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
|
|
1178
1180
|
}
|
|
1179
1181
|
get hasSelfTest() {
|
|
1180
1182
|
return true;
|
|
@@ -1186,44 +1188,19 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1186
1188
|
return false;
|
|
1187
1189
|
}
|
|
1188
1190
|
async detectCmp() {
|
|
1189
|
-
return
|
|
1191
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_1");
|
|
1190
1192
|
}
|
|
1191
1193
|
async detectPopup() {
|
|
1192
|
-
return
|
|
1194
|
+
return await waitFor(() => {
|
|
1195
|
+
return this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1196
|
+
}, 10, 500);
|
|
1193
1197
|
}
|
|
1194
1198
|
async optOut() {
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
}
|
|
1201
|
-
if (elementExists("#dtcookie-container")) {
|
|
1202
|
-
return click(".h-dtcookie-decline");
|
|
1203
|
-
}
|
|
1204
|
-
if (click(".cookiebot__button--settings")) {
|
|
1205
|
-
return true;
|
|
1206
|
-
}
|
|
1207
|
-
if (click("#CybotCookiebotDialogBodyButtonDecline")) {
|
|
1208
|
-
return true;
|
|
1209
|
-
}
|
|
1210
|
-
click(".cookiebanner__link--details");
|
|
1211
|
-
click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
|
|
1212
|
-
click("#CybotCookiebotDialogBodyButtonDecline");
|
|
1213
|
-
click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
|
|
1214
|
-
if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
|
|
1215
|
-
click("#CybotCookiebotDialogBodyButtonAcceptSelected");
|
|
1216
|
-
} else {
|
|
1217
|
-
click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
|
|
1218
|
-
}
|
|
1219
|
-
if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
|
|
1220
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1221
|
-
await wait(500);
|
|
1222
|
-
}
|
|
1223
|
-
if (elementExists("#cb-confirmedSettings")) {
|
|
1224
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1225
|
-
}
|
|
1226
|
-
return true;
|
|
1199
|
+
await wait(500);
|
|
1200
|
+
let res = await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1201
|
+
await wait(500);
|
|
1202
|
+
res = res && await this.mainWorldEval("EVAL_COOKIEBOT_4");
|
|
1203
|
+
return res;
|
|
1227
1204
|
}
|
|
1228
1205
|
async optIn() {
|
|
1229
1206
|
if (elementExists("#dtcookie-container")) {
|
|
@@ -1235,7 +1212,8 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1235
1212
|
return true;
|
|
1236
1213
|
}
|
|
1237
1214
|
async test() {
|
|
1238
|
-
|
|
1215
|
+
await wait(500);
|
|
1216
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_5");
|
|
1239
1217
|
}
|
|
1240
1218
|
};
|
|
1241
1219
|
|