@duckduckgo/autoconsent 14.79.0 → 14.80.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 +18 -0
- package/dist/addon-firefox/background.bundle.js +1 -1
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +1 -1
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.extra.cjs.js +501 -166
- package/dist/autoconsent.extra.esm.js +501 -166
- package/lib/filterlist-engine.ts +2 -2
- package/package.json +4 -4
- package/rules/autoconsent/ketch.json +50 -10
- package/rules/autoconsent/tealium.json +1 -1
- package/rules/autoconsent/usercentrics-api.json +14 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/ketch.spec.ts +8 -0
- package/tests/usercentrics-api.spec.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckduckgo/autoconsent",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.80.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "./dist/types/web.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"chai": "^6.0.1",
|
|
70
70
|
"chokidar-cli": "^3.0.0",
|
|
71
71
|
"csv-parse": "^6.0.0",
|
|
72
|
-
"esbuild": "^0.
|
|
72
|
+
"esbuild": "^0.28.0",
|
|
73
73
|
"eslint": "^10.0.3",
|
|
74
74
|
"globals": "^17.4.0",
|
|
75
75
|
"markdown-it": "^14.0.0",
|
|
76
76
|
"mocha": "^11.0.1",
|
|
77
|
-
"prettier": "3.8.
|
|
77
|
+
"prettier": "3.8.3",
|
|
78
78
|
"randexp": "^0.5.3",
|
|
79
|
-
"sinon": "^
|
|
79
|
+
"sinon": "^22.0.0",
|
|
80
80
|
"ts-json-schema-generator": "^2.3.0",
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
82
|
"tslib": "^2.4.0",
|
|
@@ -6,15 +6,20 @@
|
|
|
6
6
|
"main": true
|
|
7
7
|
},
|
|
8
8
|
"intermediate": false,
|
|
9
|
-
"prehideSelectors": ["#lanyard_root div[role='dialog']"],
|
|
9
|
+
"prehideSelectors": ["#lanyard_root div[role='dialog']", "#ketch-banner", "#ketch-modal"],
|
|
10
10
|
"detectCmp": [
|
|
11
11
|
{
|
|
12
|
-
"
|
|
12
|
+
"any": [
|
|
13
|
+
{ "exists": "#lanyard_root div[role='dialog']" },
|
|
14
|
+
{ "exists": "#ketch-banner" },
|
|
15
|
+
{ "exists": "#ketch-modal" },
|
|
16
|
+
{ "exists": "#lanyard_root [class*='ketch-fixed']" }
|
|
17
|
+
]
|
|
13
18
|
}
|
|
14
19
|
],
|
|
15
20
|
"detectPopup": [
|
|
16
21
|
{
|
|
17
|
-
"visible": "#lanyard_root div[role='dialog']"
|
|
22
|
+
"any": [{ "visible": "#lanyard_root div[role='dialog']" }, { "visible": "#ketch-banner" }, { "visible": "#ketch-modal" }]
|
|
18
23
|
}
|
|
19
24
|
],
|
|
20
25
|
"optIn": [
|
|
@@ -26,34 +31,69 @@
|
|
|
26
31
|
{ "waitForThenClick": "#lanyard_root div[class*=buttons] > :nth-child(2)" },
|
|
27
32
|
{ "click": "#lanyard_root button[class='confirmButton']" }
|
|
28
33
|
],
|
|
29
|
-
"else": [
|
|
34
|
+
"else": [
|
|
35
|
+
{
|
|
36
|
+
"waitForThenClick": "#ketch-banner-button-primary, #lanyard_root div[class*=buttons] > :nth-child(2)"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
30
39
|
}
|
|
31
40
|
],
|
|
32
41
|
"optOut": [
|
|
33
42
|
{
|
|
43
|
+
"comment": "If the banner has a direct Reject All button (newer Ketch DOM), click it and we're done.",
|
|
44
|
+
"if": {
|
|
45
|
+
"exists": "#ketch-banner-button-tertiary"
|
|
46
|
+
},
|
|
47
|
+
"then": [{ "waitForThenClick": "#ketch-banner-button-tertiary" }]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"comment": "Older banner variant exposed via aria-describedby=banner-description: open settings/reject (same button class)",
|
|
34
51
|
"if": {
|
|
35
52
|
"exists": "#lanyard_root [aria-describedby=banner-description]"
|
|
36
53
|
},
|
|
37
54
|
"then": [
|
|
38
55
|
{
|
|
39
|
-
"
|
|
40
|
-
|
|
56
|
+
"if": {
|
|
57
|
+
"exists": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton], #lanyard_root button[class*=buttons-secondary]"
|
|
58
|
+
},
|
|
59
|
+
"then": [
|
|
60
|
+
{
|
|
61
|
+
"waitForThenClick": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton], #lanyard_root button[class*=buttons-secondary]",
|
|
62
|
+
"comment": "can be either settings or reject button"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"else": [
|
|
66
|
+
{
|
|
67
|
+
"if": {
|
|
68
|
+
"exists": "#lanyard_root [id^='ketch-banner-buttons-container'] > button:only-child"
|
|
69
|
+
},
|
|
70
|
+
"then": [
|
|
71
|
+
{
|
|
72
|
+
"click": "#lanyard_root [id^='ketch-banner-buttons-container'] > button:only-child",
|
|
73
|
+
"comment": "Disclosure-only banner (e.g. US/CCPA notice with a single 'I understand'/'OK' acknowledge button and no reject option). Clicking the lone button dismisses the notice; consent state is already determined by Ketch's jurisdiction defaults."
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
41
78
|
}
|
|
42
79
|
]
|
|
43
80
|
},
|
|
44
81
|
{
|
|
45
|
-
"waitFor": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences",
|
|
82
|
+
"waitFor": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences, #ketch-purposes-modal",
|
|
46
83
|
"timeout": 1000,
|
|
47
84
|
"optional": true
|
|
48
85
|
},
|
|
49
86
|
{
|
|
87
|
+
"comment": "Preferences/purposes modal is open: click Reject All then Confirm.",
|
|
50
88
|
"if": {
|
|
51
|
-
"exists": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences"
|
|
89
|
+
"exists": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences, #ketch-purposes-modal"
|
|
52
90
|
},
|
|
53
91
|
"then": [
|
|
54
|
-
{ "waitForThenClick": "#lanyard_root button[class*=rejectButton], #lanyard_root button[class*=rejectAllButton]" },
|
|
55
92
|
{
|
|
56
|
-
"
|
|
93
|
+
"waitForThenClick": "#lanyard_root button[class*=rejectButton], #lanyard_root button[class*=rejectAllButton], #ketch-modal button[aria-label='Reject All'], #ketch-purposes-modal button[aria-label='Reject All']"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"click": "#lanyard_root button[class*=confirmButton], #lanyard_root div[class*=actions_] > button:nth-child(1), #lanyard_root button[class*=actionButton], #ketch-modal button[aria-label='Confirm'], #ketch-purposes-modal button[aria-label='Confirm']"
|
|
57
97
|
}
|
|
58
98
|
]
|
|
59
99
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{ "eval": "EVAL_TEALIUM_DONOTSELL" },
|
|
9
9
|
{ "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#__tealiumImplicitmodal" },
|
|
10
10
|
{
|
|
11
|
-
"waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies,#continueWithoutAccepting,#no_consent",
|
|
11
|
+
"waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies,#continueWithoutAccepting,#no_consent,#consent_prompt_decline",
|
|
12
12
|
"timeout": 1000,
|
|
13
13
|
"optional": true
|
|
14
14
|
}
|
|
@@ -27,6 +27,19 @@
|
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"optIn": [{ "eval": "EVAL_USERCENTRICS_API_3" }, { "eval": "EVAL_USERCENTRICS_API_1" }, { "eval": "EVAL_USERCENTRICS_API_5" }],
|
|
30
|
-
"optOut": [
|
|
30
|
+
"optOut": [
|
|
31
|
+
{
|
|
32
|
+
"if": { "exists": ["#usercentrics-root", "[data-testid=uc-deny-all-button]"] },
|
|
33
|
+
"then": [{ "click": ["#usercentrics-root", "[data-testid=uc-deny-all-button]"] }],
|
|
34
|
+
"else": [
|
|
35
|
+
{
|
|
36
|
+
"if": { "exists": ["#usercentrics-cmp-ui", "[data-action-type=deny]"] },
|
|
37
|
+
"then": [{ "click": ["#usercentrics-cmp-ui", "[data-action-type=deny]"] }],
|
|
38
|
+
"else": [{ "eval": "EVAL_USERCENTRICS_API_1" }, { "eval": "EVAL_USERCENTRICS_API_2" }]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{ "removeClass": "overflowHidden", "selector": "body", "optional": true }
|
|
43
|
+
],
|
|
31
44
|
"test": [{ "eval": "EVAL_USERCENTRICS_API_6" }]
|
|
32
45
|
}
|