@duckduckgo/autoconsent 10.4.0 → 10.6.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/.github/workflows/ddg-release.yml +84 -26
- package/CHANGELOG.md +39 -0
- package/ci/asana-create-tasks.js +1 -3
- package/ci/create-pr-template.js +1 -1
- package/data/coverage.json +1107 -1027
- package/dist/addon-firefox/background.bundle.js +3 -3
- package/dist/addon-firefox/content.bundle.js +3 -3
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +105 -2
- package/dist/addon-mv3/background.bundle.js +3 -3
- package/dist/addon-mv3/content.bundle.js +3 -3
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +105 -2
- package/dist/autoconsent.cjs.js +3 -3
- package/dist/autoconsent.esm.js +3 -3
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.unit.js +108 -5
- package/lib/eval-snippets.ts +2 -2
- package/package.json +1 -1
- package/rules/autoconsent/complianz-opt-out.json +47 -0
- package/rules/autoconsent/ens-modal.json +13 -0
- package/rules/autoconsent/ens-notify-banner.json +12 -0
- package/rules/autoconsent/moove.json +1 -1
- package/rules/autoconsent/tarteaucitron.json +1 -1
- package/rules/rules.json +105 -2
package/dist/autoconsent.unit.js
CHANGED
|
@@ -540,8 +540,8 @@
|
|
|
540
540
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll("div > button")).filter((el) => el.innerText.match("Accept|Annehmen"))[0].click() || true,
|
|
541
541
|
EVAL_MICROSOFT_2: () => !!document.cookie.match("MSCC|GHCC"),
|
|
542
542
|
EVAL_MOOVE_0: () => document.querySelectorAll("#moove_gdpr_cookie_modal input").forEach((i) => {
|
|
543
|
-
if (!i.disabled
|
|
544
|
-
i.checked =
|
|
543
|
+
if (!i.disabled)
|
|
544
|
+
i.checked = i.name === "moove_gdpr_strict_cookies" || i.id === "moove_gdpr_strict_cookies";
|
|
545
545
|
}) || true,
|
|
546
546
|
EVAL_ONENINETWO_0: () => document.cookie.includes("CC_ADVERTISING=NO") && document.cookie.includes("CC_ANALYTICS=NO"),
|
|
547
547
|
EVAL_OPERA_0: () => document.cookie.includes("cookie_consent_essential=true") && !document.cookie.includes("cookie_consent_marketing=true"),
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
EVAL_TAKEALOT_0: () => document.body.classList.remove("freeze") || (document.body.style = "") || true,
|
|
564
564
|
EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
|
|
565
565
|
EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
|
|
566
|
-
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes("false"),
|
|
566
|
+
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)?.[0].includes("false"),
|
|
567
567
|
EVAL_TAUNTON_TEST: () => document.cookie.includes("taunton_user_consent_submitted=true"),
|
|
568
568
|
EVAL_TEALIUM_0: () => typeof window.utag !== "undefined" && typeof utag.gdpr === "object",
|
|
569
569
|
EVAL_TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true,
|
|
@@ -3890,6 +3890,53 @@
|
|
|
3890
3890
|
}
|
|
3891
3891
|
]
|
|
3892
3892
|
},
|
|
3893
|
+
{
|
|
3894
|
+
name: "Complianz opt-out",
|
|
3895
|
+
prehideSelectors: [
|
|
3896
|
+
'[aria-describedby="cookieconsent:desc"].cc-type-opt-out'
|
|
3897
|
+
],
|
|
3898
|
+
detectCmp: [
|
|
3899
|
+
{
|
|
3900
|
+
exists: '[aria-describedby="cookieconsent:desc"].cc-type-opt-out'
|
|
3901
|
+
}
|
|
3902
|
+
],
|
|
3903
|
+
detectPopup: [
|
|
3904
|
+
{
|
|
3905
|
+
visible: '[aria-describedby="cookieconsent:desc"].cc-type-opt-out'
|
|
3906
|
+
}
|
|
3907
|
+
],
|
|
3908
|
+
optIn: [
|
|
3909
|
+
{
|
|
3910
|
+
click: ".cc-accept-all",
|
|
3911
|
+
optional: true
|
|
3912
|
+
},
|
|
3913
|
+
{
|
|
3914
|
+
click: ".cc-allow",
|
|
3915
|
+
optional: true
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
click: ".cc-dismiss",
|
|
3919
|
+
optional: true
|
|
3920
|
+
}
|
|
3921
|
+
],
|
|
3922
|
+
optOut: [
|
|
3923
|
+
{
|
|
3924
|
+
if: {
|
|
3925
|
+
exists: ".cc-deny"
|
|
3926
|
+
},
|
|
3927
|
+
then: [
|
|
3928
|
+
{
|
|
3929
|
+
click: ".cc-deny"
|
|
3930
|
+
}
|
|
3931
|
+
],
|
|
3932
|
+
else: [
|
|
3933
|
+
{
|
|
3934
|
+
hide: '[aria-describedby="cookieconsent:desc"]'
|
|
3935
|
+
}
|
|
3936
|
+
]
|
|
3937
|
+
}
|
|
3938
|
+
]
|
|
3939
|
+
},
|
|
3893
3940
|
{
|
|
3894
3941
|
name: "Complianz optin",
|
|
3895
3942
|
prehideSelectors: [
|
|
@@ -4865,6 +4912,62 @@
|
|
|
4865
4912
|
}
|
|
4866
4913
|
]
|
|
4867
4914
|
},
|
|
4915
|
+
{
|
|
4916
|
+
name: "Ensighten ensModal",
|
|
4917
|
+
prehideSelectors: [
|
|
4918
|
+
".ensModal"
|
|
4919
|
+
],
|
|
4920
|
+
detectCmp: [
|
|
4921
|
+
{
|
|
4922
|
+
exists: ".ensModal"
|
|
4923
|
+
}
|
|
4924
|
+
],
|
|
4925
|
+
detectPopup: [
|
|
4926
|
+
{
|
|
4927
|
+
visible: ".ensModal"
|
|
4928
|
+
}
|
|
4929
|
+
],
|
|
4930
|
+
optIn: [
|
|
4931
|
+
{
|
|
4932
|
+
waitForThenClick: "#modalAcceptButton"
|
|
4933
|
+
}
|
|
4934
|
+
],
|
|
4935
|
+
optOut: [
|
|
4936
|
+
{
|
|
4937
|
+
waitForThenClick: ".ensCheckbox:checked",
|
|
4938
|
+
all: true
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
waitForThenClick: "#ensSave"
|
|
4942
|
+
}
|
|
4943
|
+
]
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
name: "Ensighten ensNotifyBanner",
|
|
4947
|
+
prehideSelectors: [
|
|
4948
|
+
"#ensNotifyBanner"
|
|
4949
|
+
],
|
|
4950
|
+
detectCmp: [
|
|
4951
|
+
{
|
|
4952
|
+
exists: "#ensNotifyBanner"
|
|
4953
|
+
}
|
|
4954
|
+
],
|
|
4955
|
+
detectPopup: [
|
|
4956
|
+
{
|
|
4957
|
+
visible: "#ensNotifyBanner"
|
|
4958
|
+
}
|
|
4959
|
+
],
|
|
4960
|
+
optIn: [
|
|
4961
|
+
{
|
|
4962
|
+
waitForThenClick: "#ensCloseBanner"
|
|
4963
|
+
}
|
|
4964
|
+
],
|
|
4965
|
+
optOut: [
|
|
4966
|
+
{
|
|
4967
|
+
waitForThenClick: "#ensRejectAll,#rejectAll,#ensRejectBanner"
|
|
4968
|
+
}
|
|
4969
|
+
]
|
|
4970
|
+
},
|
|
4868
4971
|
{
|
|
4869
4972
|
name: "etsy",
|
|
4870
4973
|
prehideSelectors: [
|
|
@@ -6441,7 +6544,7 @@
|
|
|
6441
6544
|
],
|
|
6442
6545
|
detectPopup: [
|
|
6443
6546
|
{
|
|
6444
|
-
visible: "#moove_gdpr_cookie_info_bar"
|
|
6547
|
+
visible: "#moove_gdpr_cookie_info_bar:not(.moove-gdpr-info-bar-hidden)"
|
|
6445
6548
|
}
|
|
6446
6549
|
],
|
|
6447
6550
|
optIn: [
|
|
@@ -7806,7 +7909,7 @@
|
|
|
7806
7909
|
],
|
|
7807
7910
|
detectPopup: [
|
|
7808
7911
|
{
|
|
7809
|
-
visible: "#tarteaucitronRoot #
|
|
7912
|
+
visible: "#tarteaucitronRoot #tarteaucitronAlertBig",
|
|
7810
7913
|
check: "any"
|
|
7811
7914
|
}
|
|
7812
7915
|
],
|
package/lib/eval-snippets.ts
CHANGED
|
@@ -85,7 +85,7 @@ export const snippets = {
|
|
|
85
85
|
EVAL_MICROSOFT_0: () => Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Reject|Ablehnen'))[0].click() || true,
|
|
86
86
|
EVAL_MICROSOFT_1: () => Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Accept|Annehmen'))[0].click() || true,
|
|
87
87
|
EVAL_MICROSOFT_2: () => !!document.cookie.match('MSCC|GHCC'),
|
|
88
|
-
EVAL_MOOVE_0: () => document.querySelectorAll('#moove_gdpr_cookie_modal input').forEach(i => { if (!i.disabled
|
|
88
|
+
EVAL_MOOVE_0: () => document.querySelectorAll('#moove_gdpr_cookie_modal input').forEach(i => { if (!i.disabled) i.checked = (i.name === 'moove_gdpr_strict_cookies' || i.id === 'moove_gdpr_strict_cookies') }) || true,
|
|
89
89
|
EVAL_ONENINETWO_0: () => document.cookie.includes('CC_ADVERTISING=NO') && document.cookie.includes('CC_ANALYTICS=NO'),
|
|
90
90
|
EVAL_OPERA_0: () => document.cookie.includes('cookie_consent_essential=true') && !document.cookie.includes('cookie_consent_marketing=true'),
|
|
91
91
|
EVAL_PAYPAL_0: () => document.cookie.includes('cookie_prefs') === true,
|
|
@@ -105,7 +105,7 @@ export const snippets = {
|
|
|
105
105
|
EVAL_TAKEALOT_0: () => document.body.classList.remove('freeze') || (document.body.style = '') || true,
|
|
106
106
|
EVAL_TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true,
|
|
107
107
|
EVAL_TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true,
|
|
108
|
-
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes('false'),
|
|
108
|
+
EVAL_TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)?.[0].includes('false'),
|
|
109
109
|
EVAL_TAUNTON_TEST: () => document.cookie.includes('taunton_user_consent_submitted=true'),
|
|
110
110
|
EVAL_TEALIUM_0: () => typeof window.utag !== 'undefined' && typeof utag.gdpr === 'object',
|
|
111
111
|
EVAL_TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true,
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Complianz opt-out",
|
|
3
|
+
"prehideSelectors": [
|
|
4
|
+
"[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
5
|
+
],
|
|
6
|
+
"detectCmp": [
|
|
7
|
+
{
|
|
8
|
+
"exists": "[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"detectPopup": [
|
|
12
|
+
{
|
|
13
|
+
"visible": "[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"optIn": [
|
|
17
|
+
{
|
|
18
|
+
"click": ".cc-accept-all",
|
|
19
|
+
"optional": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"click": ".cc-allow",
|
|
23
|
+
"optional": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"click": ".cc-dismiss",
|
|
27
|
+
"optional": true
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"optOut": [
|
|
31
|
+
{
|
|
32
|
+
"if": {
|
|
33
|
+
"exists": ".cc-deny"
|
|
34
|
+
},
|
|
35
|
+
"then": [
|
|
36
|
+
{
|
|
37
|
+
"click": ".cc-deny"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"else": [
|
|
41
|
+
{
|
|
42
|
+
"hide": "[aria-describedby=\"cookieconsent:desc\"]"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Ensighten ensModal",
|
|
3
|
+
"prehideSelectors": [".ensModal"],
|
|
4
|
+
"detectCmp": [{ "exists": ".ensModal" }],
|
|
5
|
+
"detectPopup": [{ "visible": ".ensModal" }],
|
|
6
|
+
"optIn": [
|
|
7
|
+
{ "waitForThenClick": "#modalAcceptButton" }
|
|
8
|
+
],
|
|
9
|
+
"optOut": [
|
|
10
|
+
{ "waitForThenClick": ".ensCheckbox:checked", "all": true },
|
|
11
|
+
{ "waitForThenClick": "#ensSave" }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Ensighten ensNotifyBanner",
|
|
3
|
+
"prehideSelectors": ["#ensNotifyBanner"],
|
|
4
|
+
"detectCmp": [{ "exists": "#ensNotifyBanner" }],
|
|
5
|
+
"detectPopup": [{ "visible": "#ensNotifyBanner" }],
|
|
6
|
+
"optIn": [
|
|
7
|
+
{ "waitForThenClick": "#ensCloseBanner" }
|
|
8
|
+
],
|
|
9
|
+
"optOut": [
|
|
10
|
+
{ "waitForThenClick": "#ensRejectAll,#rejectAll,#ensRejectBanner" }
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "Moove",
|
|
3
3
|
"prehideSelectors": ["#moove_gdpr_cookie_info_bar"],
|
|
4
4
|
"detectCmp": [{ "exists": "#moove_gdpr_cookie_info_bar" }],
|
|
5
|
-
"detectPopup": [{ "visible": "#moove_gdpr_cookie_info_bar" }],
|
|
5
|
+
"detectPopup": [{ "visible": "#moove_gdpr_cookie_info_bar:not(.moove-gdpr-info-bar-hidden)" }],
|
|
6
6
|
"optIn": [
|
|
7
7
|
{ "waitForThenClick": ".moove-gdpr-infobar-allow-all" }
|
|
8
8
|
],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"prehideSelectors": ["#tarteaucitronRoot"],
|
|
4
4
|
"detectCmp": [{ "exists": "#tarteaucitronRoot" }],
|
|
5
5
|
"detectPopup": [{
|
|
6
|
-
"visible": "#tarteaucitronRoot #
|
|
6
|
+
"visible": "#tarteaucitronRoot #tarteaucitronAlertBig",
|
|
7
7
|
"check": "any"
|
|
8
8
|
}],
|
|
9
9
|
"optIn": [
|
package/rules/rules.json
CHANGED
|
@@ -1530,6 +1530,53 @@
|
|
|
1530
1530
|
}
|
|
1531
1531
|
]
|
|
1532
1532
|
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "Complianz opt-out",
|
|
1535
|
+
"prehideSelectors": [
|
|
1536
|
+
"[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
1537
|
+
],
|
|
1538
|
+
"detectCmp": [
|
|
1539
|
+
{
|
|
1540
|
+
"exists": "[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
1541
|
+
}
|
|
1542
|
+
],
|
|
1543
|
+
"detectPopup": [
|
|
1544
|
+
{
|
|
1545
|
+
"visible": "[aria-describedby=\"cookieconsent:desc\"].cc-type-opt-out"
|
|
1546
|
+
}
|
|
1547
|
+
],
|
|
1548
|
+
"optIn": [
|
|
1549
|
+
{
|
|
1550
|
+
"click": ".cc-accept-all",
|
|
1551
|
+
"optional": true
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
"click": ".cc-allow",
|
|
1555
|
+
"optional": true
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"click": ".cc-dismiss",
|
|
1559
|
+
"optional": true
|
|
1560
|
+
}
|
|
1561
|
+
],
|
|
1562
|
+
"optOut": [
|
|
1563
|
+
{
|
|
1564
|
+
"if": {
|
|
1565
|
+
"exists": ".cc-deny"
|
|
1566
|
+
},
|
|
1567
|
+
"then": [
|
|
1568
|
+
{
|
|
1569
|
+
"click": ".cc-deny"
|
|
1570
|
+
}
|
|
1571
|
+
],
|
|
1572
|
+
"else": [
|
|
1573
|
+
{
|
|
1574
|
+
"hide": "[aria-describedby=\"cookieconsent:desc\"]"
|
|
1575
|
+
}
|
|
1576
|
+
]
|
|
1577
|
+
}
|
|
1578
|
+
]
|
|
1579
|
+
},
|
|
1533
1580
|
{
|
|
1534
1581
|
"name": "Complianz optin",
|
|
1535
1582
|
"prehideSelectors": [
|
|
@@ -2505,6 +2552,62 @@
|
|
|
2505
2552
|
}
|
|
2506
2553
|
]
|
|
2507
2554
|
},
|
|
2555
|
+
{
|
|
2556
|
+
"name": "Ensighten ensModal",
|
|
2557
|
+
"prehideSelectors": [
|
|
2558
|
+
".ensModal"
|
|
2559
|
+
],
|
|
2560
|
+
"detectCmp": [
|
|
2561
|
+
{
|
|
2562
|
+
"exists": ".ensModal"
|
|
2563
|
+
}
|
|
2564
|
+
],
|
|
2565
|
+
"detectPopup": [
|
|
2566
|
+
{
|
|
2567
|
+
"visible": ".ensModal"
|
|
2568
|
+
}
|
|
2569
|
+
],
|
|
2570
|
+
"optIn": [
|
|
2571
|
+
{
|
|
2572
|
+
"waitForThenClick": "#modalAcceptButton"
|
|
2573
|
+
}
|
|
2574
|
+
],
|
|
2575
|
+
"optOut": [
|
|
2576
|
+
{
|
|
2577
|
+
"waitForThenClick": ".ensCheckbox:checked",
|
|
2578
|
+
"all": true
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
"waitForThenClick": "#ensSave"
|
|
2582
|
+
}
|
|
2583
|
+
]
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"name": "Ensighten ensNotifyBanner",
|
|
2587
|
+
"prehideSelectors": [
|
|
2588
|
+
"#ensNotifyBanner"
|
|
2589
|
+
],
|
|
2590
|
+
"detectCmp": [
|
|
2591
|
+
{
|
|
2592
|
+
"exists": "#ensNotifyBanner"
|
|
2593
|
+
}
|
|
2594
|
+
],
|
|
2595
|
+
"detectPopup": [
|
|
2596
|
+
{
|
|
2597
|
+
"visible": "#ensNotifyBanner"
|
|
2598
|
+
}
|
|
2599
|
+
],
|
|
2600
|
+
"optIn": [
|
|
2601
|
+
{
|
|
2602
|
+
"waitForThenClick": "#ensCloseBanner"
|
|
2603
|
+
}
|
|
2604
|
+
],
|
|
2605
|
+
"optOut": [
|
|
2606
|
+
{
|
|
2607
|
+
"waitForThenClick": "#ensRejectAll,#rejectAll,#ensRejectBanner"
|
|
2608
|
+
}
|
|
2609
|
+
]
|
|
2610
|
+
},
|
|
2508
2611
|
{
|
|
2509
2612
|
"name": "etsy",
|
|
2510
2613
|
"prehideSelectors": [
|
|
@@ -4081,7 +4184,7 @@
|
|
|
4081
4184
|
],
|
|
4082
4185
|
"detectPopup": [
|
|
4083
4186
|
{
|
|
4084
|
-
"visible": "#moove_gdpr_cookie_info_bar"
|
|
4187
|
+
"visible": "#moove_gdpr_cookie_info_bar:not(.moove-gdpr-info-bar-hidden)"
|
|
4085
4188
|
}
|
|
4086
4189
|
],
|
|
4087
4190
|
"optIn": [
|
|
@@ -5446,7 +5549,7 @@
|
|
|
5446
5549
|
],
|
|
5447
5550
|
"detectPopup": [
|
|
5448
5551
|
{
|
|
5449
|
-
"visible": "#tarteaucitronRoot #
|
|
5552
|
+
"visible": "#tarteaucitronRoot #tarteaucitronAlertBig",
|
|
5450
5553
|
"check": "any"
|
|
5451
5554
|
}
|
|
5452
5555
|
],
|