@duckduckgo/autoconsent 9.5.0 → 9.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 +31 -0
- package/dist/addon-firefox/background.bundle.js +7 -0
- package/dist/addon-firefox/content.bundle.js +20 -6
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +948 -13
- package/dist/addon-mv3/background.bundle.js +7 -0
- package/dist/addon-mv3/content.bundle.js +20 -6
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +948 -13
- package/dist/autoconsent.cjs.js +20 -6
- package/dist/autoconsent.esm.js +20 -6
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.unit.js +966 -17
- package/lib/eval-snippets.ts +7 -0
- package/lib/web.ts +13 -10
- package/package.json +1 -1
- package/rules/autoconsent/abconcerts.be.json +39 -0
- package/rules/autoconsent/aliexpress.json +39 -0
- package/rules/autoconsent/arbeitsagentur.json +36 -0
- package/rules/autoconsent/asus.json +43 -0
- package/rules/autoconsent/cookieacceptbar.json +26 -0
- package/rules/autoconsent/cookieconsent2.json +32 -0
- package/rules/autoconsent/cookieconsent3.json +29 -0
- package/rules/autoconsent/dndbeyond.json +31 -0
- package/rules/autoconsent/hashicorp.json +31 -0
- package/rules/autoconsent/hu-manity.json +28 -0
- package/rules/autoconsent/jdsports.json +39 -0
- package/rules/autoconsent/lineagrafica.json +26 -0
- package/rules/autoconsent/livejasmin.json +39 -0
- package/rules/autoconsent/om.json +40 -0
- package/rules/autoconsent/openli.json +26 -0
- package/rules/autoconsent/ourworldindata.json +28 -0
- package/rules/autoconsent/pabcogypsum.json +25 -0
- package/rules/autoconsent/productz.com.json +28 -0
- package/rules/autoconsent/reddit.json +19 -5
- package/rules/autoconsent/setapp.com.json +29 -0
- package/rules/autoconsent/svt.se.json +31 -0
- package/rules/autoconsent/taunton.json +36 -0
- package/rules/autoconsent/tealium.json +4 -4
- package/rules/autoconsent/termsfeed.json +26 -0
- package/rules/autoconsent/termsfeed3.json +27 -0
- package/rules/autoconsent/twitch-mobile.json +29 -0
- package/rules/autoconsent/webflow.json +34 -0
- package/rules/autoconsent/wolframalpha.json +29 -0
- package/rules/autoconsent/xe.com.json +39 -0
- package/rules/create-rule.mjs +2 -2
- package/rules/rules.json +948 -13
- package/tests/abconcerts.be.spec.ts +7 -0
- package/tests/aliexpress.spec.ts +6 -0
- package/tests/arbeitsagentur.spec.ts +5 -0
- package/tests/asus.spec.ts +6 -0
- package/tests/cookieacceptbar.spec.ts +6 -0
- package/tests/cookieconsent2.spec.ts +7 -0
- package/tests/cookieconsent3.spec.ts +5 -0
- package/tests/dndbeyond.spec.ts +5 -0
- package/tests/hashicorp.spec.ts +5 -0
- package/tests/hu-manity.spec.ts +7 -0
- package/tests/jdsports.spec.ts +5 -0
- package/tests/lineagrafica.spec.ts +5 -0
- package/tests/livejasmin.spec.ts +5 -0
- package/tests/om.spec.ts +9 -0
- package/tests/openli.spec.ts +6 -0
- package/tests/ourworldindata.spec.ts +5 -0
- package/tests/pabcogypsum.spec.ts +5 -0
- package/tests/productz.com.spec.ts +5 -0
- package/tests/setapp.com.spec.ts +5 -0
- package/tests/svt.se.spec.ts +5 -0
- package/tests/taunton.spec.ts +11 -0
- package/tests/termsfeed.spec.ts +6 -0
- package/tests/termsfeed3.spec.ts +7 -0
- package/tests/twitch-mobile.spec.ts +5 -0
- package/tests/webflow.spec.ts +7 -0
- package/tests/wolframalpha.spec.ts +5 -0
- package/tests/xe.com.spec.ts +5 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "productz.com",
|
|
3
|
+
"vendorUrl": "https://productz.com/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://productz\\.com/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": [],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": ".c-modal.is-active"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ".c-modal.is-active"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": ".c-modal.is-active .is-accept"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": ".c-modal.is-active .is-dismiss"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -3,18 +3,32 @@
|
|
|
3
3
|
"runContext": {
|
|
4
4
|
"urlPattern": "^https://www\\.reddit\\.com/"
|
|
5
5
|
},
|
|
6
|
-
"prehideSelectors": ["
|
|
6
|
+
"prehideSelectors": ["[bundlename=reddit_cookie_banner]"],
|
|
7
7
|
"detectCmp": [
|
|
8
|
-
{
|
|
8
|
+
{
|
|
9
|
+
"exists": "reddit-cookie-banner"
|
|
10
|
+
}
|
|
9
11
|
],
|
|
10
12
|
"detectPopup": [
|
|
11
|
-
{
|
|
13
|
+
{
|
|
14
|
+
"visible": "reddit-cookie-banner"
|
|
15
|
+
}
|
|
12
16
|
],
|
|
13
17
|
"optIn": [
|
|
14
|
-
{
|
|
18
|
+
{
|
|
19
|
+
"waitForThenClick": [
|
|
20
|
+
"reddit-cookie-banner",
|
|
21
|
+
"#accept-all-cookies-button > button"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
15
24
|
],
|
|
16
25
|
"optOut": [
|
|
17
|
-
{
|
|
26
|
+
{
|
|
27
|
+
"waitForThenClick": [
|
|
28
|
+
"reddit-cookie-banner",
|
|
29
|
+
"#reject-nonessential-cookies-button > button"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
18
32
|
],
|
|
19
33
|
"test": [
|
|
20
34
|
{"eval": "EVAL_REDDIT_0"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "setapp.com",
|
|
3
|
+
"vendorUrl": "https://setapp.com/",
|
|
4
|
+
"cosmetic": true,
|
|
5
|
+
"runContext": {
|
|
6
|
+
"urlPattern": "^https://setapp\\.com/"
|
|
7
|
+
},
|
|
8
|
+
"prehideSelectors": [],
|
|
9
|
+
"detectCmp": [
|
|
10
|
+
{
|
|
11
|
+
"exists": ".cookie-banner.js-cookie-banner"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"detectPopup": [
|
|
15
|
+
{
|
|
16
|
+
"visible": ".cookie-banner.js-cookie-banner"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"optIn": [
|
|
20
|
+
{
|
|
21
|
+
"waitForThenClick": ".cookie-banner.js-cookie-banner button"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"optOut": [
|
|
25
|
+
{
|
|
26
|
+
"hide": ".cookie-banner.js-cookie-banner"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "svt.se",
|
|
3
|
+
"vendorUrl": "https://www.svt.se/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://www\\.svt\\.se/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": ["[class*=CookieConsent__root___]"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": "[class*=CookieConsent__root___]"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": "[class*=CookieConsent__modal___]"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": "[class*=CookieConsent__modal___] > div > button[class*=primary]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": "[class*=CookieConsent__modal___] > div > button[class*=secondary]:nth-child(2)"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"test": [{
|
|
29
|
+
"eval": "EVAL_SVT_TEST"
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "taunton",
|
|
3
|
+
"vendorUrl": "https://www.taunton.com/",
|
|
4
|
+
"prehideSelectors": ["#taunton-user-consent__overlay"],
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": "#taunton-user-consent__overlay"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"exists": "#taunton-user-consent__overlay:not([aria-hidden=true])"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"optIn": [
|
|
16
|
+
{
|
|
17
|
+
"click": "#taunton-user-consent__toolbar input[type=checkbox]:not(:checked)"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"click": "#taunton-user-consent__toolbar button[type=submit]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"click": "#taunton-user-consent__toolbar input[type=checkbox]:checked",
|
|
26
|
+
"optional": true,
|
|
27
|
+
"all": true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"click": "#taunton-user-consent__toolbar button[type=submit]"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"test": [{
|
|
34
|
+
"eval": "EVAL_TAUNTON_TEST"
|
|
35
|
+
}]
|
|
36
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Tealium",
|
|
3
|
-
"prehideSelectors": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#consent-layer"],
|
|
3
|
+
"prehideSelectors": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#__tealiumImplicitmodal,#consent-layer"],
|
|
4
4
|
"detectCmp": [
|
|
5
|
-
{ "exists": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *" },
|
|
5
|
+
{ "exists": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *,#__tealiumImplicitmodal *" },
|
|
6
6
|
{ "eval": "EVAL_TEALIUM_0" }
|
|
7
7
|
],
|
|
8
8
|
"detectPopup": [
|
|
9
|
-
{ "visible": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *", "check": "any" }
|
|
9
|
+
{ "visible": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *,#__tealiumImplicitmodal *", "check": "any" }
|
|
10
10
|
],
|
|
11
11
|
"optOut": [
|
|
12
12
|
{ "eval": "EVAL_TEALIUM_1" },
|
|
13
13
|
{ "eval": "EVAL_TEALIUM_DONOTSELL" },
|
|
14
|
-
{ "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs" },
|
|
14
|
+
{ "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#__tealiumImplicitmodal" },
|
|
15
15
|
{
|
|
16
16
|
"waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies",
|
|
17
17
|
"timeout": 1000,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "termsfeed",
|
|
3
|
+
"vendorUrl": "https://termsfeed.com",
|
|
4
|
+
"comment": "v4.x.x",
|
|
5
|
+
"prehideSelectors": [".termsfeed-com---nb"],
|
|
6
|
+
"detectCmp": [
|
|
7
|
+
{
|
|
8
|
+
"exists": ".termsfeed-com---nb"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"detectPopup": [
|
|
12
|
+
{
|
|
13
|
+
"visible": ".termsfeed-com---nb"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"optIn": [
|
|
17
|
+
{
|
|
18
|
+
"waitForThenClick": ".cc-nb-okagree"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"optOut": [
|
|
22
|
+
{
|
|
23
|
+
"waitForThenClick": ".cc-nb-reject"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "termsfeed3",
|
|
3
|
+
"vendorUrl": "https://termsfeed.com",
|
|
4
|
+
"comment": "v3.x.x",
|
|
5
|
+
"cosmetic": true,
|
|
6
|
+
"prehideSelectors": [".cc_dialog.cc_css_reboot"],
|
|
7
|
+
"detectCmp": [
|
|
8
|
+
{
|
|
9
|
+
"exists": ".cc_dialog.cc_css_reboot"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"detectPopup": [
|
|
13
|
+
{
|
|
14
|
+
"visible": ".cc_dialog.cc_css_reboot"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"optIn": [
|
|
18
|
+
{
|
|
19
|
+
"waitForThenClick": ".cc_dialog.cc_css_reboot .cc_b_ok"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"optOut": [
|
|
23
|
+
{
|
|
24
|
+
"hide": ".cc_dialog.cc_css_reboot"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "twitch-mobile",
|
|
3
|
+
"vendorUrl": "https://m.twitch.tv/",
|
|
4
|
+
"cosmetic": true,
|
|
5
|
+
"runContext": {
|
|
6
|
+
"urlPattern": "^https?:\/\/m\\.twitch\\.tv"
|
|
7
|
+
},
|
|
8
|
+
"prehideSelectors": [],
|
|
9
|
+
"detectCmp": [
|
|
10
|
+
{
|
|
11
|
+
"exists": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"])"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"detectPopup": [
|
|
15
|
+
{
|
|
16
|
+
"visible": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"])"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"optIn": [
|
|
20
|
+
{
|
|
21
|
+
"waitForThenClick": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"]) button"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"optOut": [
|
|
25
|
+
{
|
|
26
|
+
"hide": ".ReactModal__Overlay:has([href=\"https://www.twitch.tv/p/cookie-policy\"])"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webflow",
|
|
3
|
+
"vendorUrl": "https://webflow.com/",
|
|
4
|
+
"prehideSelectors": [".fs-cc-components"],
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": ".fs-cc-components"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"visible": ".fs-cc-components"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"visible": "[fs-cc=banner]"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"wait": 500
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"waitForThenClick": "[fs-cc=banner] [fs-cc=allow]"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"optOut": [
|
|
27
|
+
{
|
|
28
|
+
"wait": 500
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"waitForThenClick": "[fs-cc=banner] [fs-cc=deny]"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wolframalpha",
|
|
3
|
+
"vendorUrl": "https://www.wolframalpha.com",
|
|
4
|
+
"prehideSelectors": [],
|
|
5
|
+
"cosmetic": true,
|
|
6
|
+
"runContext": {
|
|
7
|
+
"urlPattern": "^https://www\\.wolframalpha\\.com/"
|
|
8
|
+
},
|
|
9
|
+
"detectCmp": [
|
|
10
|
+
{
|
|
11
|
+
"exists": "section._a_yb"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"detectPopup": [
|
|
15
|
+
{
|
|
16
|
+
"visible": "section._a_yb"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"optIn": [
|
|
20
|
+
{
|
|
21
|
+
"waitForThenClick": "section._a_yb button"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"optOut": [
|
|
25
|
+
{
|
|
26
|
+
"hide": "section._a_yb"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xe.com",
|
|
3
|
+
"vendorUrl": "https://www.xe.com/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://www\\.xe\\.com/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": ["[class*=ConsentBanner]"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": "[class*=ConsentBanner]"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": "[class*=ConsentBanner]"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": "[class*=ConsentBanner] .egnScw"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"wait": 1000
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"waitForThenClick": "[class*=ConsentBanner] .frDWEu"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"waitForThenClick": "[class*=ConsentBanner] .hXIpFU"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"test": [
|
|
35
|
+
{
|
|
36
|
+
"eval": "EVAL_XE_TEST"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
package/rules/create-rule.mjs
CHANGED
|
@@ -19,14 +19,14 @@ const prompt = (query) => new Promise((resolve) => rl.question(query, resolve));
|
|
|
19
19
|
runContext: {
|
|
20
20
|
main: true,
|
|
21
21
|
frame: false,
|
|
22
|
+
urlPattern: '',
|
|
22
23
|
},
|
|
23
|
-
intermediate: false,
|
|
24
24
|
prehideSelectors: [],
|
|
25
25
|
detectCmp: [{ exists: '#TODO'}],
|
|
26
26
|
detectPopup: [{ visible: '#TODO'}],
|
|
27
27
|
optIn: [{ waitForThenClick: '#Accept'}],
|
|
28
28
|
optOut: [{ waitForThenClick: '#Reject'}],
|
|
29
|
-
test: []
|
|
29
|
+
test: [{ eval: "EVAL_TODO" }]
|
|
30
30
|
}
|
|
31
31
|
const ruleString = JSON.stringify(rule, undefined, 2)
|
|
32
32
|
const testString = `import generateCMPTests from "../playwright/runner";
|