@duckduckgo/autoconsent 18.6.0 → 18.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 +23 -0
- package/ci/asana-create-release-task.js +5 -1
- package/dist/addon-firefox/background.bundle.js +1 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +1 -0
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +1 -0
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +1 -0
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +1 -0
- package/dist/autoconsent.esm.js +1 -0
- package/dist/autoconsent.playwright.js +1 -0
- package/dist/autoconsent.standalone.js +2 -1
- package/dist/types/eval-snippets.d.ts +1 -0
- package/lib/eval-snippets.ts +1 -0
- package/package.json +1 -1
- package/rules/autoconsent/burpee-com.json +5 -1
- package/rules/autoconsent/mediamarkt-de.json +12 -2
- package/rules/autoconsent/posthog.com.json +12 -0
- package/rules/autoconsent/sirdata.json +1 -1
- package/rules/autoconsent/walmart-ca.json +13 -2
- package/rules/autoconsent/wbd-legal-terms.json +4 -5
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/mediamarkt.spec.ts +1 -1
- package/tests/posthog.com.spec.ts +3 -0
- package/tests/trustarc.spec.ts +6 -0
|
@@ -61,6 +61,7 @@ export declare const snippets: {
|
|
|
61
61
|
EVAL_NHNIEUWS_TEST: () => boolean;
|
|
62
62
|
EVAL_OSANO_DETECT: () => boolean;
|
|
63
63
|
EVAL_PANDECTES_TEST: () => boolean;
|
|
64
|
+
EVAL_POSTHOG_TEST: () => boolean;
|
|
64
65
|
EVAL_POVR_GOBACK: () => boolean;
|
|
65
66
|
EVAL_PUBTECH_0: () => false | RegExpMatchArray | null;
|
|
66
67
|
EVAL_SHOPIFY_TEST: () => boolean;
|
package/lib/eval-snippets.ts
CHANGED
|
@@ -219,6 +219,7 @@ export const snippets = {
|
|
|
219
219
|
.split('=')[1],
|
|
220
220
|
),
|
|
221
221
|
).status === 'deny',
|
|
222
|
+
EVAL_POSTHOG_TEST: () => localStorage.getItem('cookie_consent') === 'acknowledged',
|
|
222
223
|
EVAL_POVR_GOBACK: () => window.history.back() || true,
|
|
223
224
|
EVAL_PUBTECH_0: () =>
|
|
224
225
|
document.cookie.includes('euconsent-v2') &&
|
package/package.json
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"name": "burpee.com",
|
|
3
3
|
"minimumRuleStepVersion": 2,
|
|
4
4
|
"prehideSelectors": [".cookie-modal", "#notice-cookie-block"],
|
|
5
|
-
"detectCmp": [
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{ "exists": "#notice-cookie-block" },
|
|
7
|
+
{ "exists": "#notice-cookie-block #cm-selectSpecific", "negated": true },
|
|
8
|
+
{ "any": [{ "visible": "#notice-cookie-block" }, { "cookieContains": "user_allowed_save_cookie=", "negated": true }] }
|
|
9
|
+
],
|
|
6
10
|
"detectPopup": [{ "visible": "#html-body #notice-cookie-block" }],
|
|
7
11
|
"optIn": [
|
|
8
12
|
{
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
"prehideSelectors": ["div[aria-labelledby=pwa-consent-layer-title]", "div[class^=StyledConsentLayerWrapper-]"],
|
|
4
4
|
"detectCmp": [{ "exists": "div[aria-labelledby^=pwa-consent-layer-title]" }],
|
|
5
5
|
"detectPopup": [{ "exists": "div[aria-labelledby^=pwa-consent-layer-title]" }],
|
|
6
|
-
"optOut": [
|
|
7
|
-
|
|
6
|
+
"optOut": [
|
|
7
|
+
{
|
|
8
|
+
"if": { "exists": "button[data-test^=pwa-consent-layer-deny-all]" },
|
|
9
|
+
"then": [{ "click": "button[data-test^=pwa-consent-layer-deny-all]" }],
|
|
10
|
+
"else": [
|
|
11
|
+
{ "click": "form[data-test=pwa-consent-layer] [role=switch][aria-checked=true]", "all": true, "optional": true },
|
|
12
|
+
{ "waitForThenClick": "button[data-test^=pwa-consent-layer-save-settings]" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"optIn": [{ "click": "button[data-test^=pwa-consent-layer-accept-all]" }],
|
|
17
|
+
"test": [{ "wait": 1000 }, { "cookieContains": "|comfort:0" }]
|
|
8
18
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "posthog.com",
|
|
3
|
+
"runContext": { "urlPattern": "^https?://(www\\.)?posthog\\.com/" },
|
|
4
|
+
"detectCmp": [{ "exists": "xpath///li[contains(@class,'ToastRoot')][contains(., 'cookie banner')]" }],
|
|
5
|
+
"detectPopup": [{ "visible": "xpath///li[contains(@class,'ToastRoot')][contains(., 'cookie banner')]" }],
|
|
6
|
+
"optIn": [{ "waitForThenClick": "xpath///li[contains(@class,'ToastRoot')][contains(., 'cookie banner')]//button" }],
|
|
7
|
+
"optOut": [
|
|
8
|
+
{ "waitForThenClick": "xpath///li[contains(@class,'ToastRoot')][contains(., 'cookie banner')]//button" },
|
|
9
|
+
{ "waitForVisible": "xpath///li[contains(@class,'ToastRoot')][contains(., 'cookie banner')]", "check": "none" }
|
|
10
|
+
],
|
|
11
|
+
"test": [{ "eval": "EVAL_POSTHOG_TEST" }]
|
|
12
|
+
}
|
|
@@ -27,8 +27,16 @@
|
|
|
27
27
|
"optOut": [
|
|
28
28
|
{
|
|
29
29
|
"waitForThenClick": "button[data-dca-intent=\"open\"][role=\"link\"]",
|
|
30
|
-
"retry":
|
|
31
|
-
"retryInterval":
|
|
30
|
+
"retry": 10,
|
|
31
|
+
"retryInterval": 1000
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"waitFor": "#advertisingCookies"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"click": "#personalizationCookies:checked, #advertisingCookies:checked",
|
|
38
|
+
"all": true,
|
|
39
|
+
"optional": true
|
|
32
40
|
},
|
|
33
41
|
{
|
|
34
42
|
"waitForThenClick": "xpath///button[contains(., 'Save settings') or contains(., 'Enregistrer les paramètres')]"
|
|
@@ -39,6 +47,9 @@
|
|
|
39
47
|
"waitForVisible": "a[href=\"https://www.walmartcanada.ca/cookie-notice\"]",
|
|
40
48
|
"check": "none",
|
|
41
49
|
"timeout": 5000
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"cookieContains": "&p13n=false&ads=false&"
|
|
42
53
|
}
|
|
43
54
|
]
|
|
44
55
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wbd-legal-terms",
|
|
3
3
|
"vendorUrl": "https://www.wbd.com/",
|
|
4
|
-
"comment": "Terms-and-cookies notice with only an Agree button. The <dialog> variant is modal, so hiding it with CSS leaves the page inert; close it without submitting the form instead. The MUI modal variant cannot be dismissed, so it is hidden. Sweepstakes pages only load their entry form (ngxFrame embed) after Agree, so the rule skips them to keep the popup available.",
|
|
4
|
+
"comment": "Terms-and-cookies notice with only an Agree button. The <dialog> variant is modal, so hiding it with CSS leaves the page inert; close it without submitting the form instead. The MUI modal variant cannot be dismissed, so it is hidden; its scroll lock is overridden with a stylesheet because the site re-applies it inline on client-side navigation. Sweepstakes pages only load their entry form (ngxFrame embed) after Agree, so the rule skips them to keep the popup available.",
|
|
5
5
|
"cosmetic": true,
|
|
6
|
-
"minimumRuleStepVersion":
|
|
6
|
+
"minimumRuleStepVersion": 3,
|
|
7
7
|
"detectCmp": [
|
|
8
8
|
{
|
|
9
9
|
"exists": "dialog#ltp-dialog, [id=\"id/ltp\"]"
|
|
@@ -44,9 +44,8 @@
|
|
|
44
44
|
"hide": "[id=\"id/ltp\"]"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"optional": true
|
|
47
|
+
"stylesheet": "body:has([id=\"id/ltp\"]) { overflow: auto !important; }",
|
|
48
|
+
"stylesheetId": "wbd-legal-terms-scroll-unlock"
|
|
50
49
|
}
|
|
51
50
|
]
|
|
52
51
|
}
|