@duckduckgo/autoconsent 16.3.0 → 16.5.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 +33 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/devtools/panel.html +5 -0
- package/dist/addon-firefox/devtools/panel.ts +18 -1
- 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/compact-rules.json +1 -1
- package/dist/addon-mv3/devtools/panel.html +5 -0
- package/dist/addon-mv3/devtools/panel.js +12 -0
- package/dist/addon-mv3/devtools/panel.ts +18 -1
- 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.standalone.js +1 -1
- package/package.json +1 -1
- package/rules/autoconsent/ketch.json +58 -19
- package/rules/autoconsent/msn.json +18 -0
- package/rules/autoconsent/pikpak.json +48 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/tests/ketch.spec.ts +33 -19
- package/tests/msn.spec.ts +5 -0
- package/tests/pikpak.spec.ts +12 -0
package/package.json
CHANGED
|
@@ -40,37 +40,61 @@
|
|
|
40
40
|
],
|
|
41
41
|
"optOut": [
|
|
42
42
|
{
|
|
43
|
-
"comment": "
|
|
43
|
+
"comment": "Banner phase: pick one banner action.",
|
|
44
44
|
"if": {
|
|
45
|
-
"exists": "#ketch-banner
|
|
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)",
|
|
51
|
-
"if": {
|
|
52
|
-
"exists": "#lanyard_root [aria-describedby=banner-description]"
|
|
45
|
+
"exists": "#lanyard_root button[aria-label^='Reject' i], #ketch-banner button[aria-label^='Reject' i]"
|
|
53
46
|
},
|
|
54
47
|
"then": [
|
|
55
48
|
{
|
|
49
|
+
"waitForThenClick": "#lanyard_root button[aria-label^='Reject' i], #ketch-banner button[aria-label^='Reject' i]"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"comment": "Submit if the preferences modal is still open (Reject All only toggled switches).",
|
|
56
53
|
"if": {
|
|
57
|
-
"
|
|
54
|
+
"visible": "#lanyard_root [aria-describedby=preference-description], #lanyard_root [aria-describedby=modal-description], #ketch-modal, #ketch-purposes-modal, #ketch-preferences"
|
|
58
55
|
},
|
|
59
56
|
"then": [
|
|
60
57
|
{
|
|
61
|
-
"
|
|
62
|
-
"comment": "can be either settings or reject button"
|
|
58
|
+
"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'], #ketch-modal button[aria-label='Save Settings'], #ketch-purposes-modal button[aria-label='Save Settings']"
|
|
63
59
|
}
|
|
64
|
-
]
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"else": [
|
|
64
|
+
{
|
|
65
|
+
"comment": "Reject button without aria-label match.",
|
|
66
|
+
"if": {
|
|
67
|
+
"exists": "#ketch-banner-button-tertiary"
|
|
68
|
+
},
|
|
69
|
+
"then": [{ "waitForThenClick": "#ketch-banner-button-tertiary" }],
|
|
65
70
|
"else": [
|
|
66
71
|
{
|
|
72
|
+
"comment": "Open settings from banner, or dismiss disclosure-only banner.",
|
|
67
73
|
"if": {
|
|
68
|
-
"exists": "#lanyard_root [
|
|
74
|
+
"exists": "#lanyard_root [aria-describedby=banner-description]"
|
|
69
75
|
},
|
|
70
76
|
"then": [
|
|
71
77
|
{
|
|
72
|
-
"
|
|
73
|
-
|
|
78
|
+
"if": {
|
|
79
|
+
"exists": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton], #lanyard_root button[class*=buttons-secondary], #ketch-banner-button-secondary"
|
|
80
|
+
},
|
|
81
|
+
"then": [
|
|
82
|
+
{
|
|
83
|
+
"waitForThenClick": "#lanyard_root div[class*=buttons] > button[class*=secondaryButton], #lanyard_root button[class*=buttons-secondary], #ketch-banner-button-secondary"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"else": [
|
|
87
|
+
{
|
|
88
|
+
"if": {
|
|
89
|
+
"exists": "#lanyard_root [id^='ketch-banner-buttons-container'] > button:only-child"
|
|
90
|
+
},
|
|
91
|
+
"then": [
|
|
92
|
+
{
|
|
93
|
+
"click": "#lanyard_root [id^='ketch-banner-buttons-container'] > button:only-child"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
74
98
|
}
|
|
75
99
|
]
|
|
76
100
|
}
|
|
@@ -84,16 +108,31 @@
|
|
|
84
108
|
"optional": true
|
|
85
109
|
},
|
|
86
110
|
{
|
|
87
|
-
"comment": "Preferences
|
|
111
|
+
"comment": "Preferences modal handling.",
|
|
88
112
|
"if": {
|
|
89
113
|
"exists": "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description], #ketch-preferences, #ketch-purposes-modal"
|
|
90
114
|
},
|
|
91
115
|
"then": [
|
|
92
116
|
{
|
|
93
|
-
"
|
|
117
|
+
"if": {
|
|
118
|
+
"exists": "#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']"
|
|
119
|
+
},
|
|
120
|
+
"then": [
|
|
121
|
+
{
|
|
122
|
+
"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']"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"else": [
|
|
126
|
+
{
|
|
127
|
+
"comment": "No Reject All: uncheck every enabled purpose switch.",
|
|
128
|
+
"click": "#lanyard_root input[type=checkbox][role=switch][aria-checked=true]:not(:disabled)",
|
|
129
|
+
"all": true,
|
|
130
|
+
"optional": true
|
|
131
|
+
}
|
|
132
|
+
]
|
|
94
133
|
},
|
|
95
134
|
{
|
|
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']"
|
|
135
|
+
"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'], #ketch-modal button[aria-label='Save Settings'], #ketch-purposes-modal button[aria-label='Save Settings']"
|
|
97
136
|
}
|
|
98
137
|
]
|
|
99
138
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "msn",
|
|
3
|
+
"_metadata": {
|
|
4
|
+
"vendorUrl": "https://www.msn.com"
|
|
5
|
+
},
|
|
6
|
+
"cosmetic": false,
|
|
7
|
+
"runContext": {
|
|
8
|
+
"main": true,
|
|
9
|
+
"frame": false,
|
|
10
|
+
"urlPattern": "^https?://(www\\.)?msn\\.com/"
|
|
11
|
+
},
|
|
12
|
+
"prehideSelectors": ["#cmp-banner-sdk", ".cmp-sdk-container"],
|
|
13
|
+
"detectCmp": [{ "exists": "#cmp-banner-sdk" }],
|
|
14
|
+
"detectPopup": [{ "visible": "#cmp-banner-sdk" }],
|
|
15
|
+
"optIn": [{ "waitForThenClick": "#cmp-accept-btn-handler" }],
|
|
16
|
+
"optOut": [{ "waitForThenClick": "#cmp-reject-all-handler" }],
|
|
17
|
+
"test": [{ "cookieContains": "OptanonAlertBoxClosed" }]
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pikpak",
|
|
3
|
+
"vendorUrl": "https://mypikpak.com/",
|
|
4
|
+
"prehideSelectors": [".cookie-wrapper .cookie-tip"],
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": ".cookie-wrapper .cookie-tip__container"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"visible": ".cookie-wrapper .cookie-tip__text"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"optIn": [
|
|
16
|
+
{
|
|
17
|
+
"waitForThenClick": ".cookie-wrapper .cookie-tip__button button.el-button--primary"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"optOut": [
|
|
21
|
+
{
|
|
22
|
+
"waitForThenClick": ".cookie-wrapper .cookie-tip__button > .button"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"waitForVisible": ".el-dialog.cookie-dialog"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"click": ".el-dialog.cookie-dialog .el-switch.is-checked",
|
|
29
|
+
"all": true,
|
|
30
|
+
"optional": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"waitForThenClick": ".el-dialog.cookie-dialog .el-dialog__footer button.el-button--primary"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"test": [
|
|
37
|
+
{
|
|
38
|
+
"any": [
|
|
39
|
+
{
|
|
40
|
+
"cookieContains": "allow_analysis=%22false%22"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"cookieContains": "allow_analysis=false"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|