@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 +30 -0
- package/dist/addon-firefox/background.bundle.js +1 -0
- package/dist/addon-firefox/content.bundle.js +19 -40
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +97 -0
- package/dist/addon-mv3/background.bundle.js +1 -0
- package/dist/addon-mv3/content.bundle.js +19 -40
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +97 -0
- package/dist/autoconsent.cjs.js +19 -40
- package/dist/autoconsent.esm.js +19 -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 +6 -4
- package/package.json +2 -2
- package/rules/autoconsent/cookieyes.json +32 -0
- package/rules/autoconsent/yahoo.json +15 -0
- package/rules/rules.json +97 -0
- package/tests/cookiebot.spec.ts +11 -0
- package/tests/cookieyes.spec.ts +10 -0
- package/tests/yahoo.spec.ts +7 -0
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",
|
|
@@ -663,6 +664,7 @@ var snippets = {
|
|
|
663
664
|
EVAL_COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true,
|
|
664
665
|
EVAL_COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true,
|
|
665
666
|
EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
|
|
667
|
+
EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
|
|
666
668
|
EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
|
|
667
669
|
EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
|
|
668
670
|
EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
|
|
@@ -770,6 +772,7 @@ var AutoConsentCMPBase = class {
|
|
|
770
772
|
return Promise.resolve(result);
|
|
771
773
|
}
|
|
772
774
|
const snippetSrc = getFunctionBody(snippet);
|
|
775
|
+
enableLogs && console.log("async eval:", snippetId, snippetSrc);
|
|
773
776
|
return requestEval(snippetSrc).catch((e) => {
|
|
774
777
|
enableLogs && console.error("error evaluating rule", snippetId, e);
|
|
775
778
|
return false;
|
|
@@ -1173,7 +1176,7 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1173
1176
|
constructor() {
|
|
1174
1177
|
super(...arguments);
|
|
1175
1178
|
this.name = "Cybotcookiebot";
|
|
1176
|
-
this.prehideSelectors = ["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"];
|
|
1179
|
+
this.prehideSelectors = ["#CybotCookiebotDialog,#CybotCookiebotDialogBodyUnderlay,#dtcookie-container,#cookiebanner,#cb-cookieoverlay,.modal--cookie-banner,#cookiebanner_outer,#CookieBanner"];
|
|
1177
1180
|
}
|
|
1178
1181
|
get hasSelfTest() {
|
|
1179
1182
|
return true;
|
|
@@ -1185,44 +1188,19 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1185
1188
|
return false;
|
|
1186
1189
|
}
|
|
1187
1190
|
async detectCmp() {
|
|
1188
|
-
return
|
|
1191
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_1");
|
|
1189
1192
|
}
|
|
1190
1193
|
async detectPopup() {
|
|
1191
|
-
return
|
|
1194
|
+
return await waitFor(() => {
|
|
1195
|
+
return this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1196
|
+
}, 10, 500);
|
|
1192
1197
|
}
|
|
1193
1198
|
async optOut() {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
}
|
|
1200
|
-
if (elementExists("#dtcookie-container")) {
|
|
1201
|
-
return click(".h-dtcookie-decline");
|
|
1202
|
-
}
|
|
1203
|
-
if (click(".cookiebot__button--settings")) {
|
|
1204
|
-
return true;
|
|
1205
|
-
}
|
|
1206
|
-
if (click("#CybotCookiebotDialogBodyButtonDecline")) {
|
|
1207
|
-
return true;
|
|
1208
|
-
}
|
|
1209
|
-
click(".cookiebanner__link--details");
|
|
1210
|
-
click('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled', true);
|
|
1211
|
-
click("#CybotCookiebotDialogBodyButtonDecline");
|
|
1212
|
-
click("input[id^=CybotCookiebotDialogBodyLevelButton]:checked", true);
|
|
1213
|
-
if (elementExists("#CybotCookiebotDialogBodyButtonAcceptSelected")) {
|
|
1214
|
-
click("#CybotCookiebotDialogBodyButtonAcceptSelected");
|
|
1215
|
-
} else {
|
|
1216
|
-
click("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection", true);
|
|
1217
|
-
}
|
|
1218
|
-
if (await this.mainWorldEval("EVAL_COOKIEBOT_1")) {
|
|
1219
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_2");
|
|
1220
|
-
await wait(500);
|
|
1221
|
-
}
|
|
1222
|
-
if (elementExists("#cb-confirmedSettings")) {
|
|
1223
|
-
await this.mainWorldEval("EVAL_COOKIEBOT_3");
|
|
1224
|
-
}
|
|
1225
|
-
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;
|
|
1226
1204
|
}
|
|
1227
1205
|
async optIn() {
|
|
1228
1206
|
if (elementExists("#dtcookie-container")) {
|
|
@@ -1234,7 +1212,8 @@ var Cookiebot = class extends AutoConsentCMPBase {
|
|
|
1234
1212
|
return true;
|
|
1235
1213
|
}
|
|
1236
1214
|
async test() {
|
|
1237
|
-
|
|
1215
|
+
await wait(500);
|
|
1216
|
+
return await this.mainWorldEval("EVAL_COOKIEBOT_5");
|
|
1238
1217
|
}
|
|
1239
1218
|
};
|
|
1240
1219
|
|