@duckduckgo/autoconsent 12.7.0 → 12.9.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 +61 -0
- package/data/coverage.json +1348 -1305
- package/dist/addon-firefox/background.bundle.js +9 -1
- package/dist/addon-firefox/content.bundle.js +21 -3
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +390 -84
- package/dist/addon-mv3/background.bundle.js +9 -1
- package/dist/addon-mv3/content.bundle.js +21 -3
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +1 -1
- package/dist/addon-mv3/rules.json +390 -84
- package/dist/autoconsent.cjs.js +19 -1
- package/dist/autoconsent.esm.js +19 -1
- package/dist/autoconsent.extra.cjs.js +21 -3
- package/dist/autoconsent.extra.esm.js +21 -3
- package/dist/autoconsent.playwright.js +411 -87
- package/lib/cmps/sourcepoint-frame.ts +13 -0
- package/lib/eval-snippets.ts +14 -0
- package/lib/filterlist-engine.ts +2 -2
- package/lib/rules.ts +2 -1
- package/package.json +6 -3
- package/rules/autoconsent/civic-cookie-control.json +23 -12
- package/rules/autoconsent/cookie-law-info.json +4 -4
- package/rules/autoconsent/dsgvo.json +1 -1
- package/rules/autoconsent/fides.json +3 -3
- package/rules/autoconsent/gov-uk.json +19 -5
- package/rules/autoconsent/gravito.json +44 -0
- package/rules/autoconsent/johnlewis.json +1 -1
- package/rules/autoconsent/opera.com.json +7 -10
- package/rules/autoconsent/postnl.json +34 -0
- package/rules/autoconsent/privado.json +48 -0
- package/rules/autoconsent/quantcast.json +22 -4
- package/rules/autoconsent/shopify.json +31 -0
- package/rules/autoconsent/squiz.json +39 -0
- package/rules/autoconsent/tccCmpAlert.json +25 -0
- package/rules/autoconsent/tealium.json +1 -1
- package/rules/autoconsent/termly.json +2 -2
- package/rules/autoconsent/true-car.json +1 -1
- package/rules/autoconsent/twitter.json +1 -2
- package/rules/autoconsent/womenshealthmag-us.json +31 -0
- package/rules/filterlist.txt +96 -330
- package/rules/rules.json +390 -84
- package/scripts/get-text-for-xpath.ts +5 -2
- package/scripts/validate-json-rules.js +45 -0
- package/tests/civic-cookie-control.spec.ts +7 -3
- package/tests/cookielawinfo.spec.ts +3 -1
- package/tests/fides.spec.ts +1 -1
- package/tests/gravito.spec.ts +3 -0
- package/tests/postnl.spec.ts +3 -0
- package/tests/privado.spec.ts +3 -0
- package/tests/shopify.spec.ts +7 -0
- package/tests/squiz.spec.ts +3 -0
- package/tests/tccCmpAlert.spec.ts +3 -0
- package/tests/termly.spec.ts +11 -1
- package/tests/womenshealthmag-us.spec.ts +3 -0
- package/rules/autoconsent/wetransfer.json +0 -7
- package/tests/wetransfer.spec.ts +0 -5
|
@@ -96,6 +96,19 @@ export default class SourcePoint extends AutoConsentCMPBase {
|
|
|
96
96
|
return this.click('.priv-save-btn');
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// sometimes there's a "Save and Exit" / "Essential cookies" button
|
|
100
|
+
if (this.elementVisible('.sp_choice_type_SE', 'any')) {
|
|
101
|
+
// click the "Do Not Sell" toggle if it exists
|
|
102
|
+
this.click(
|
|
103
|
+
[
|
|
104
|
+
"xpath///div[contains(., 'Do not share my personal information') and contains(@class, 'switch-container')]",
|
|
105
|
+
'.pm-switch[aria-checked=false] .slider',
|
|
106
|
+
],
|
|
107
|
+
false,
|
|
108
|
+
);
|
|
109
|
+
return this.click('.sp_choice_type_SE');
|
|
110
|
+
}
|
|
111
|
+
|
|
99
112
|
if (!this.isManagerOpen()) {
|
|
100
113
|
const actionable = await this.waitForVisible('.sp_choice_type_12,.sp_choice_type_13');
|
|
101
114
|
if (!actionable) {
|
package/lib/eval-snippets.ts
CHANGED
|
@@ -138,6 +138,7 @@ export const snippets = {
|
|
|
138
138
|
EVAL_EZOIC_1: () => !!document.cookie.match(/ez-consent-tcf/),
|
|
139
139
|
EVAL_FIDES_DETECT_POPUP: () => window.Fides?.initialized,
|
|
140
140
|
EVAL_GOOGLE_0: () => !!document.cookie.match(/SOCS=CAE/),
|
|
141
|
+
EVAL_GRAVITO_TEST: () => document.cookie.includes('gravitoData'),
|
|
141
142
|
EVAL_HEMA_TEST_0: () => document.cookie.includes('cookies_rejected=1'),
|
|
142
143
|
EVAL_IUBENDA_0: () =>
|
|
143
144
|
document.querySelectorAll('.purposes-item input[type=checkbox]:not([disabled])').forEach((x) => {
|
|
@@ -168,11 +169,23 @@ export const snippets = {
|
|
|
168
169
|
document.cookie.includes('cookie_consent_essential=true') && !document.cookie.includes('cookie_consent_marketing=true'),
|
|
169
170
|
EVAL_PAYPAL_0: () => document.cookie.includes('cookie_prefs') === true,
|
|
170
171
|
EVAL_PRIMEBOX_0: () => !document.cookie.includes('cb-enabled=accepted'),
|
|
172
|
+
EVAL_POSTNL_TEST: () => document.cookie.includes('CookiePermissionInfo'),
|
|
171
173
|
EVAL_PUBTECH_0: () =>
|
|
172
174
|
document.cookie.includes('euconsent-v2') &&
|
|
173
175
|
(document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)),
|
|
174
176
|
EVAL_REDDIT_0: () => document.cookie.includes('eu_cookie={%22opted%22:true%2C%22nonessential%22:false}'),
|
|
175
177
|
EVAL_ROBLOX_TEST: () => document.cookie.includes('RBXcb'),
|
|
178
|
+
EVAL_SHOPIFY_TEST: () =>
|
|
179
|
+
document.cookie.includes('gdpr_cookie_consent=0') ||
|
|
180
|
+
(document.cookie.includes('_tracking_consent=') &&
|
|
181
|
+
JSON.parse(
|
|
182
|
+
decodeURIComponent(
|
|
183
|
+
document.cookie
|
|
184
|
+
.split(';')
|
|
185
|
+
.find((s) => s.trim().startsWith('_tracking_consent'))
|
|
186
|
+
.split('=')[1],
|
|
187
|
+
),
|
|
188
|
+
).purposes.a === false),
|
|
176
189
|
EVAL_SKYSCANNER_TEST: () => document.cookie.match(/gdpr=[^;]*adverts:::false/) && !document.cookie.match(/gdpr=[^;]*init:::true/),
|
|
177
190
|
EVAL_SIRDATA_UNBLOCK_SCROLL: () => {
|
|
178
191
|
document.documentElement.classList.forEach((cls) => {
|
|
@@ -181,6 +194,7 @@ export const snippets = {
|
|
|
181
194
|
return true;
|
|
182
195
|
},
|
|
183
196
|
EVAL_SNIGEL_0: () => !!document.cookie.match('snconsent'),
|
|
197
|
+
EVAL_SQUIZ_TEST: () => !!document.cookie.includes('squiz.cdp.consent'),
|
|
184
198
|
EVAL_STEAMPOWERED_0: () =>
|
|
185
199
|
JSON.parse(
|
|
186
200
|
decodeURIComponent(
|