@duckduckgo/autoconsent 9.5.0 → 9.7.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.
- package/CHANGELOG.md +31 -0
- package/dist/addon-firefox/background.bundle.js +7 -0
- package/dist/addon-firefox/content.bundle.js +20 -6
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +948 -13
- package/dist/addon-mv3/background.bundle.js +7 -0
- package/dist/addon-mv3/content.bundle.js +20 -6
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +948 -13
- package/dist/autoconsent.cjs.js +20 -6
- package/dist/autoconsent.esm.js +20 -6
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.unit.js +966 -17
- package/lib/eval-snippets.ts +7 -0
- package/lib/web.ts +13 -10
- package/package.json +1 -1
- package/rules/autoconsent/abconcerts.be.json +39 -0
- package/rules/autoconsent/aliexpress.json +39 -0
- package/rules/autoconsent/arbeitsagentur.json +36 -0
- package/rules/autoconsent/asus.json +43 -0
- package/rules/autoconsent/cookieacceptbar.json +26 -0
- package/rules/autoconsent/cookieconsent2.json +32 -0
- package/rules/autoconsent/cookieconsent3.json +29 -0
- package/rules/autoconsent/dndbeyond.json +31 -0
- package/rules/autoconsent/hashicorp.json +31 -0
- package/rules/autoconsent/hu-manity.json +28 -0
- package/rules/autoconsent/jdsports.json +39 -0
- package/rules/autoconsent/lineagrafica.json +26 -0
- package/rules/autoconsent/livejasmin.json +39 -0
- package/rules/autoconsent/om.json +40 -0
- package/rules/autoconsent/openli.json +26 -0
- package/rules/autoconsent/ourworldindata.json +28 -0
- package/rules/autoconsent/pabcogypsum.json +25 -0
- package/rules/autoconsent/productz.com.json +28 -0
- package/rules/autoconsent/reddit.json +19 -5
- package/rules/autoconsent/setapp.com.json +29 -0
- package/rules/autoconsent/svt.se.json +31 -0
- package/rules/autoconsent/taunton.json +36 -0
- package/rules/autoconsent/tealium.json +4 -4
- package/rules/autoconsent/termsfeed.json +26 -0
- package/rules/autoconsent/termsfeed3.json +27 -0
- package/rules/autoconsent/twitch-mobile.json +29 -0
- package/rules/autoconsent/webflow.json +34 -0
- package/rules/autoconsent/wolframalpha.json +29 -0
- package/rules/autoconsent/xe.com.json +39 -0
- package/rules/create-rule.mjs +2 -2
- package/rules/rules.json +948 -13
- package/tests/abconcerts.be.spec.ts +7 -0
- package/tests/aliexpress.spec.ts +6 -0
- package/tests/arbeitsagentur.spec.ts +5 -0
- package/tests/asus.spec.ts +6 -0
- package/tests/cookieacceptbar.spec.ts +6 -0
- package/tests/cookieconsent2.spec.ts +7 -0
- package/tests/cookieconsent3.spec.ts +5 -0
- package/tests/dndbeyond.spec.ts +5 -0
- package/tests/hashicorp.spec.ts +5 -0
- package/tests/hu-manity.spec.ts +7 -0
- package/tests/jdsports.spec.ts +5 -0
- package/tests/lineagrafica.spec.ts +5 -0
- package/tests/livejasmin.spec.ts +5 -0
- package/tests/om.spec.ts +9 -0
- package/tests/openli.spec.ts +6 -0
- package/tests/ourworldindata.spec.ts +5 -0
- package/tests/pabcogypsum.spec.ts +5 -0
- package/tests/productz.com.spec.ts +5 -0
- package/tests/setapp.com.spec.ts +5 -0
- package/tests/svt.se.spec.ts +5 -0
- package/tests/taunton.spec.ts +11 -0
- package/tests/termsfeed.spec.ts +6 -0
- package/tests/termsfeed3.spec.ts +7 -0
- package/tests/twitch-mobile.spec.ts +5 -0
- package/tests/webflow.spec.ts +7 -0
- package/tests/wolframalpha.spec.ts +5 -0
- package/tests/xe.com.spec.ts +5 -0
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -504,6 +504,7 @@ var snippets = {
|
|
|
504
504
|
EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
|
|
505
505
|
EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
|
|
506
506
|
EVAL_AFFINITY_SERIF_COM_0: () => document.cookie.includes("serif_manage_cookies_viewed") && !document.cookie.includes("serif_allow_analytics"),
|
|
507
|
+
EVAL_ARBEITSAGENTUR_TEST: () => document.cookie.includes("cookie_consent=denied"),
|
|
507
508
|
EVAL_AXEPTIO_0: () => document.cookie.includes("axeptio_authorized_vendors=%2C%2C"),
|
|
508
509
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
509
510
|
EVAL_BING_0: () => document.cookie.includes("AL=0") && document.cookie.includes("AD=0") && document.cookie.includes("SM=0"),
|
|
@@ -514,6 +515,8 @@ var snippets = {
|
|
|
514
515
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
515
516
|
EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
|
|
516
517
|
EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
|
|
518
|
+
EVAL_COOKIECONSENT2_TEST: () => document.cookie.includes("cc_cookie="),
|
|
519
|
+
EVAL_COOKIECONSENT3_TEST: () => document.cookie.includes("cc_cookie="),
|
|
517
520
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
518
521
|
EVAL_COMPLIANZ_BANNER_0: () => document.cookie.includes("cmplz_banner-status=dismissed"),
|
|
519
522
|
EVAL_COOKIE_LAW_INFO_0: () => CLI.disableAllCookies() || CLI.reject_close() || true,
|
|
@@ -530,6 +533,7 @@ var snippets = {
|
|
|
530
533
|
EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
|
|
531
534
|
EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
|
|
532
535
|
EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
|
|
536
|
+
EVAL_DNDBEYOND_TEST: () => document.cookie.includes("cookie-consent=denied"),
|
|
533
537
|
EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
|
|
534
538
|
EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
|
|
535
539
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
@@ -567,10 +571,12 @@ var snippets = {
|
|
|
567
571
|
EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
|
|
568
572
|
EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
|
|
569
573
|
EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
|
|
574
|
+
EVAL_SVT_TEST: () => document.cookie.includes('cookie-consent-1={"optedIn":true,"functionality":false,"statistics":false}'),
|
|
570
575
|
EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
|
|
571
576
|
EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
|
|
572
577
|
EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
|
|
573
578
|
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
|
|
579
|
+
EVAL_TAUNTON_TEST: () => document.cookie.includes("taunton_user_consent_submitted=true"),
|
|
574
580
|
EVAL_TEALIUM_0: () => typeof window.utag !== "undefined" && typeof utag.gdpr === "object",
|
|
575
581
|
EVAL_TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true,
|
|
576
582
|
EVAL_TEALIUM_DONOTSELL: () => utag.gdpr.dns?.setDnsState(false) || true,
|
|
@@ -595,6 +601,7 @@ var snippets = {
|
|
|
595
601
|
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
596
602
|
EVAL_WAITROSE_1: () => document.cookie.includes("wtr_cookies_advertising=0") && document.cookie.includes("wtr_cookies_analytics=0"),
|
|
597
603
|
EVAL_WP_COOKIE_NOTICE_0: () => document.cookie.includes("wpl_viewed_cookie=no"),
|
|
604
|
+
EVAL_XE_TEST: () => document.cookie.includes("xeConsentState={%22performance%22:false%2C%22marketing%22:false%2C%22compliance%22:false}"),
|
|
598
605
|
EVAL_XING_0: () => document.cookie.includes("userConsent=%7B%22marketing%22%3Afalse"),
|
|
599
606
|
EVAL_YOUTUBE_DESKTOP_0: () => !!document.cookie.match(/SOCS=CAE/),
|
|
600
607
|
EVAL_YOUTUBE_MOBILE_0: () => !!document.cookie.match(/SOCS=CAE/)
|
|
@@ -2088,8 +2095,14 @@ var AutoConsent = class {
|
|
|
2088
2095
|
}
|
|
2089
2096
|
return foundCMPs;
|
|
2090
2097
|
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Detect if a CMP has a popup open. Fullfils with the CMP if a popup is open, otherwise rejects.
|
|
2100
|
+
*/
|
|
2091
2101
|
async detectPopup(cmp) {
|
|
2092
|
-
const isOpen = await this.waitForPopup(cmp)
|
|
2102
|
+
const isOpen = await this.waitForPopup(cmp).catch((error) => {
|
|
2103
|
+
this.config.logs.errors && console.warn(`error waiting for a popup for ${cmp.name}`, error);
|
|
2104
|
+
return false;
|
|
2105
|
+
});
|
|
2093
2106
|
if (isOpen) {
|
|
2094
2107
|
this.updateState({ detectedPopups: this.state.detectedPopups.concat([cmp.name]) });
|
|
2095
2108
|
this.sendContentMessage({
|
|
@@ -2097,15 +2110,16 @@ var AutoConsent = class {
|
|
|
2097
2110
|
cmp: cmp.name,
|
|
2098
2111
|
url: location.href
|
|
2099
2112
|
});
|
|
2113
|
+
return cmp;
|
|
2100
2114
|
}
|
|
2101
|
-
|
|
2115
|
+
throw new Error("Popup is not shown");
|
|
2102
2116
|
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Detect if any of the CMPs has a popup open. Returns a list of CMPs with open popups.
|
|
2119
|
+
*/
|
|
2103
2120
|
async detectPopups(cmps, onFirstPopupAppears) {
|
|
2104
2121
|
const tasks = cmps.map(
|
|
2105
|
-
(cmp) => this.detectPopup(cmp)
|
|
2106
|
-
this.config.logs.errors && console.warn(`error waiting for a popup for ${cmp.name}`, error);
|
|
2107
|
-
throw error;
|
|
2108
|
-
})
|
|
2122
|
+
(cmp) => this.detectPopup(cmp)
|
|
2109
2123
|
);
|
|
2110
2124
|
await Promise.any(tasks).then((cmp) => {
|
|
2111
2125
|
onFirstPopupAppears(cmp);
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -479,6 +479,7 @@ var snippets = {
|
|
|
479
479
|
EVAL_ADROLL_0: () => !document.cookie.includes("__adroll_fpc"),
|
|
480
480
|
EVAL_ALMACMP_0: () => document.cookie.includes('"name":"Google","consent":false'),
|
|
481
481
|
EVAL_AFFINITY_SERIF_COM_0: () => document.cookie.includes("serif_manage_cookies_viewed") && !document.cookie.includes("serif_allow_analytics"),
|
|
482
|
+
EVAL_ARBEITSAGENTUR_TEST: () => document.cookie.includes("cookie_consent=denied"),
|
|
482
483
|
EVAL_AXEPTIO_0: () => document.cookie.includes("axeptio_authorized_vendors=%2C%2C"),
|
|
483
484
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
484
485
|
EVAL_BING_0: () => document.cookie.includes("AL=0") && document.cookie.includes("AD=0") && document.cookie.includes("SM=0"),
|
|
@@ -489,6 +490,8 @@ var snippets = {
|
|
|
489
490
|
EVAL_CC_BANNER2_0: () => !!document.cookie.match(/sncc=[^;]+D%3Dtrue/),
|
|
490
491
|
EVAL_CLICKIO_0: () => document.cookie.includes("__lxG__consent__v2_daisybit="),
|
|
491
492
|
EVAL_CLINCH_0: () => document.cookie.includes("ctc_rejected=1"),
|
|
493
|
+
EVAL_COOKIECONSENT2_TEST: () => document.cookie.includes("cc_cookie="),
|
|
494
|
+
EVAL_COOKIECONSENT3_TEST: () => document.cookie.includes("cc_cookie="),
|
|
492
495
|
EVAL_COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1,
|
|
493
496
|
EVAL_COMPLIANZ_BANNER_0: () => document.cookie.includes("cmplz_banner-status=dismissed"),
|
|
494
497
|
EVAL_COOKIE_LAW_INFO_0: () => CLI.disableAllCookies() || CLI.reject_close() || true,
|
|
@@ -505,6 +508,7 @@ var snippets = {
|
|
|
505
508
|
EVAL_COOKIEINFORMATION_2: () => document.cookie.includes("CookieInformationConsent="),
|
|
506
509
|
EVAL_COOKIEYES_0: () => document.cookie.includes("advertisement:no"),
|
|
507
510
|
EVAL_DAILYMOTION_0: () => !!document.cookie.match("dm-euconsent-v2"),
|
|
511
|
+
EVAL_DNDBEYOND_TEST: () => document.cookie.includes("cookie-consent=denied"),
|
|
508
512
|
EVAL_DSGVO_0: () => !document.cookie.includes("sp_dsgvo_cookie_settings"),
|
|
509
513
|
EVAL_DUNELM_0: () => document.cookie.includes("cc_functional=0") && document.cookie.includes("cc_targeting=0"),
|
|
510
514
|
EVAL_ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach((toggle) => {
|
|
@@ -542,10 +546,12 @@ var snippets = {
|
|
|
542
546
|
EVAL_SIRDATA_0: () => document.cookie.includes("euconsent-v2"),
|
|
543
547
|
EVAL_SNIGEL_0: () => !!document.cookie.match("snconsent"),
|
|
544
548
|
EVAL_STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(";").find((s) => s.trim().startsWith("cookieSettings")).split("=")[1])).preference_state === 2,
|
|
549
|
+
EVAL_SVT_TEST: () => document.cookie.includes('cookie-consent-1={"optedIn":true,"functionality":false,"statistics":false}'),
|
|
545
550
|
EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
|
|
546
551
|
EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
|
|
547
552
|
EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
|
|
548
553
|
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
|
|
554
|
+
EVAL_TAUNTON_TEST: () => document.cookie.includes("taunton_user_consent_submitted=true"),
|
|
549
555
|
EVAL_TEALIUM_0: () => typeof window.utag !== "undefined" && typeof utag.gdpr === "object",
|
|
550
556
|
EVAL_TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true,
|
|
551
557
|
EVAL_TEALIUM_DONOTSELL: () => utag.gdpr.dns?.setDnsState(false) || true,
|
|
@@ -570,6 +576,7 @@ var snippets = {
|
|
|
570
576
|
EVAL_WAITROSE_0: () => Array.from(document.querySelectorAll("label[id$=cookies-deny-label]")).forEach((e) => e.click()) || true,
|
|
571
577
|
EVAL_WAITROSE_1: () => document.cookie.includes("wtr_cookies_advertising=0") && document.cookie.includes("wtr_cookies_analytics=0"),
|
|
572
578
|
EVAL_WP_COOKIE_NOTICE_0: () => document.cookie.includes("wpl_viewed_cookie=no"),
|
|
579
|
+
EVAL_XE_TEST: () => document.cookie.includes("xeConsentState={%22performance%22:false%2C%22marketing%22:false%2C%22compliance%22:false}"),
|
|
573
580
|
EVAL_XING_0: () => document.cookie.includes("userConsent=%7B%22marketing%22%3Afalse"),
|
|
574
581
|
EVAL_YOUTUBE_DESKTOP_0: () => !!document.cookie.match(/SOCS=CAE/),
|
|
575
582
|
EVAL_YOUTUBE_MOBILE_0: () => !!document.cookie.match(/SOCS=CAE/)
|
|
@@ -2063,8 +2070,14 @@ var AutoConsent = class {
|
|
|
2063
2070
|
}
|
|
2064
2071
|
return foundCMPs;
|
|
2065
2072
|
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Detect if a CMP has a popup open. Fullfils with the CMP if a popup is open, otherwise rejects.
|
|
2075
|
+
*/
|
|
2066
2076
|
async detectPopup(cmp) {
|
|
2067
|
-
const isOpen = await this.waitForPopup(cmp)
|
|
2077
|
+
const isOpen = await this.waitForPopup(cmp).catch((error) => {
|
|
2078
|
+
this.config.logs.errors && console.warn(`error waiting for a popup for ${cmp.name}`, error);
|
|
2079
|
+
return false;
|
|
2080
|
+
});
|
|
2068
2081
|
if (isOpen) {
|
|
2069
2082
|
this.updateState({ detectedPopups: this.state.detectedPopups.concat([cmp.name]) });
|
|
2070
2083
|
this.sendContentMessage({
|
|
@@ -2072,15 +2085,16 @@ var AutoConsent = class {
|
|
|
2072
2085
|
cmp: cmp.name,
|
|
2073
2086
|
url: location.href
|
|
2074
2087
|
});
|
|
2088
|
+
return cmp;
|
|
2075
2089
|
}
|
|
2076
|
-
|
|
2090
|
+
throw new Error("Popup is not shown");
|
|
2077
2091
|
}
|
|
2092
|
+
/**
|
|
2093
|
+
* Detect if any of the CMPs has a popup open. Returns a list of CMPs with open popups.
|
|
2094
|
+
*/
|
|
2078
2095
|
async detectPopups(cmps, onFirstPopupAppears) {
|
|
2079
2096
|
const tasks = cmps.map(
|
|
2080
|
-
(cmp) => this.detectPopup(cmp)
|
|
2081
|
-
this.config.logs.errors && console.warn(`error waiting for a popup for ${cmp.name}`, error);
|
|
2082
|
-
throw error;
|
|
2083
|
-
})
|
|
2097
|
+
(cmp) => this.detectPopup(cmp)
|
|
2084
2098
|
);
|
|
2085
2099
|
await Promise.any(tasks).then((cmp) => {
|
|
2086
2100
|
onFirstPopupAppears(cmp);
|