@duckduckgo/autoconsent 17.4.0 → 18.0.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/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +34 -0
- package/dist/addon-firefox/background.bundle.js +2 -0
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +602 -53
- 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 +2 -0
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +602 -53
- 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 +608 -59
- package/dist/autoconsent.esm.js +608 -59
- package/dist/autoconsent.playwright.js +602 -53
- package/dist/autoconsent.standalone.js +609 -60
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/eval-snippets.d.ts +1 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/eval-snippets.ts +2 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
package/lib/heuristics.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { classifyButtons, classifyPopup,
|
|
1
|
+
import { classifyButtons, classifyPopup, DETECT_CONTEXT_NEGATIVES, hasHeuristicPatterns } from './heuristic-classify';
|
|
2
2
|
import { ButtonData, HeuristicLevel, HitTestGrid, PopupClassification, PopupData } from './types';
|
|
3
3
|
import { isElementVisible, isTopFrame } from './utils';
|
|
4
4
|
|
|
5
5
|
const BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
6
6
|
const POPUP_SEARCH_MAX_TIME = 100;
|
|
7
|
+
// the search climbs to a popup's root before isConsentPopup applies the whole-text exclusions, such as age gates
|
|
8
|
+
const FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
9
|
+
// the text looks like part of a consent popup, before the whole-text exclusions
|
|
10
|
+
const hasFragmentPatterns = (text: string) => hasHeuristicPatterns(text, 'popup', { negatives: FRAGMENT_NEGATIVES });
|
|
7
11
|
|
|
8
12
|
// popup classifications the heuristic rule can act on, by heuristic mode
|
|
9
13
|
const ACCEPTED_LEVELS: Record<HeuristicLevel, PopupClassification[]> = {
|
|
@@ -71,7 +75,7 @@ function isConsentPopup(popup: PopupData): boolean {
|
|
|
71
75
|
let result = consentPopups.get(popup);
|
|
72
76
|
if (result === undefined) {
|
|
73
77
|
const popupText = popup.text.trim();
|
|
74
|
-
result = !!popupText &&
|
|
78
|
+
result = !!popupText && hasHeuristicPatterns(popupText, 'popup');
|
|
75
79
|
consentPopups.set(popup, result);
|
|
76
80
|
}
|
|
77
81
|
return result;
|
|
@@ -250,7 +254,7 @@ function isOnlyButtonText(text: string, buttons: ButtonData[]): boolean {
|
|
|
250
254
|
function toPopupRoot(el: HTMLElement, shadowHosts?: HTMLElement[]): PopupData | null {
|
|
251
255
|
// check the text first: it is cheaper than collecting buttons
|
|
252
256
|
const text = getElementText(el);
|
|
253
|
-
if (!text || !
|
|
257
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
254
258
|
return null;
|
|
255
259
|
}
|
|
256
260
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -295,7 +299,7 @@ function climbToPopup(
|
|
|
295
299
|
*/
|
|
296
300
|
function expandPopupFragment(popup: PopupData, shadowHosts?: HTMLElement[]): PopupData {
|
|
297
301
|
// the same acceptance check as toPopupRoot, on the buttons already collected
|
|
298
|
-
if (
|
|
302
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
299
303
|
return popup;
|
|
300
304
|
}
|
|
301
305
|
const parent = getComposedParent(popup.element);
|
package/lib/web.ts
CHANGED
|
@@ -350,7 +350,7 @@ export default class AutoConsent {
|
|
|
350
350
|
detectHeuristics() {
|
|
351
351
|
if (this.config.enableHeuristicDetection) {
|
|
352
352
|
this.config.performanceLoggingEnabled && performance.mark('detectHeuristicsStart');
|
|
353
|
-
const { patterns, snippets } = checkHeuristicPatterns(document.documentElement?.innerText || '');
|
|
353
|
+
const { patterns, snippets } = checkHeuristicPatterns(document.documentElement?.innerText || '', 'page');
|
|
354
354
|
if (
|
|
355
355
|
patterns.length > 0 &&
|
|
356
356
|
(patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckduckgo/autoconsent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "./dist/types/web.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"test:chrome": "playwright test --project chrome",
|
|
35
35
|
"test:lib": "web-test-runner",
|
|
36
36
|
"test:sample": "playwright test tests/_sample-test.spec.ts --project webkit",
|
|
37
|
+
"build-heuristic-literals": "ts-node scripts/build-heuristic-literals.ts",
|
|
37
38
|
"build-rules": "ts-node rules/build.ts",
|
|
38
39
|
"version": "node update_version.js && git add addon/manifest.*.json",
|
|
39
40
|
"vendor-copy": "mkdir -p addon/vendor && cp node_modules/mocha/mocha.* addon/vendor/ && cp node_modules/chai/chai.js addon/vendor/",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "binogi",
|
|
3
|
+
"vendorUrl": "https://www.binogi.se/",
|
|
4
|
+
"prehideSelectors": ["#binogi_cookie_notice"],
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": "#binogi_cookie_notice #cnreject"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"visible": "#binogi_cookie_notice"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"optIn": [
|
|
16
|
+
{
|
|
17
|
+
"waitForThenClick": "#binogi_cookie_notice #cnaccept"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"optOut": [
|
|
21
|
+
{
|
|
22
|
+
"waitForThenClick": "#binogi_cookie_notice #cnreject",
|
|
23
|
+
"retry": 3
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"test": [
|
|
27
|
+
{
|
|
28
|
+
"visible": "#binogi_cookie_notice",
|
|
29
|
+
"check": "none"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bokio",
|
|
3
|
+
"runContext": {
|
|
4
|
+
"urlPattern": "^https?://(www\\.)?bokio\\.(se|co\\.uk)/"
|
|
5
|
+
},
|
|
6
|
+
"prehideSelectors": ["#cookiemodal"],
|
|
7
|
+
"detectCmp": [
|
|
8
|
+
{
|
|
9
|
+
"exists": "#cookiemodal #cookie-donottrack"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"detectPopup": [
|
|
13
|
+
{
|
|
14
|
+
"visible": "#cookiemodal:not(.cookiemodal--hidden) #cookie-donottrack"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"optIn": [
|
|
18
|
+
{
|
|
19
|
+
"waitForThenClick": "#cookiemodal #cookie-dotrack"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"optOut": [
|
|
23
|
+
{
|
|
24
|
+
"waitForThenClick": "#cookiemodal #cookie-donottrack"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"test": [
|
|
28
|
+
{
|
|
29
|
+
"cookieContains": "BokioDNT=DoNotTrack"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "botble-cookie-consent",
|
|
3
|
+
"vendorUrl": "https://botble.com/",
|
|
4
|
+
"prehideSelectors": [".js-cookie-consent:has(.js-cookie-consent-reject)"],
|
|
5
|
+
"detectCmp": [{ "exists": ".js-cookie-consent .js-cookie-consent-reject" }],
|
|
6
|
+
"detectPopup": [{ "visible": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject" }],
|
|
7
|
+
"optIn": [{ "waitForThenClick": ".js-cookie-consent :is(.js-cookie-consent-agree, .js-cookie-consent-accept)" }],
|
|
8
|
+
"optOut": [
|
|
9
|
+
{
|
|
10
|
+
"waitForThenClick": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject",
|
|
11
|
+
"retry": 5,
|
|
12
|
+
"retryInterval": 500
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"test": [{ "visible": ".js-cookie-consent:not(.is-hidden) .js-cookie-consent-reject", "check": "none" }]
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "calcolo.tools",
|
|
3
|
+
"runContext": {
|
|
4
|
+
"urlPattern": "^https?://(www\\.)?calcolo\\.tools/"
|
|
5
|
+
},
|
|
6
|
+
"prehideSelectors": ["#cc-banner"],
|
|
7
|
+
"detectCmp": [{ "visible": "#cc-banner #cc-reject" }],
|
|
8
|
+
"detectPopup": [{ "visible": "#cc-banner #cc-reject" }],
|
|
9
|
+
"optIn": [{ "waitForThenClick": "#cc-banner #cc-accept" }],
|
|
10
|
+
"optOut": [
|
|
11
|
+
{ "waitForThenClick": "#cc-banner #cc-reject" },
|
|
12
|
+
{ "waitFor": ".fc-cta-do-not-consent,.fc-cta-manage-options,.fc-li-only-placeholder", "timeout": 5000, "optional": true },
|
|
13
|
+
{
|
|
14
|
+
"if": { "exists": ".fc-cta-do-not-consent,.fc-cta-manage-options,.fc-li-only-placeholder" },
|
|
15
|
+
"then": [
|
|
16
|
+
{ "click": ".fc-cta-do-not-consent,.fc-cta-manage-options", "optional": true },
|
|
17
|
+
{ "click": ".fc-preference-consent:checked,.fc-preference-legitimate-interest:checked", "all": true, "optional": true },
|
|
18
|
+
{ "click": ".fc-confirm-choices", "optional": true }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"test": [{ "visible": "#cc-banner", "check": "none" }]
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "consilium-europa-eu",
|
|
3
|
+
"vendorUrl": "https://www.consilium.europa.eu/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://(www\\.)?consilium\\.europa\\.eu/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": [],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": "gsc-cookie-banner"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ["gsc-cookie-banner", "dialog[data-consent-banner]"]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": ["gsc-cookie-banner", ".gsc-cookie-banner__actions gsc-button:last-child"]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": ["gsc-cookie-banner", ".gsc-cookie-banner__actions gsc-button:first-child"]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"test": [
|
|
29
|
+
{
|
|
30
|
+
"waitForVisible": ["gsc-cookie-banner", "dialog[data-consent-banner]"],
|
|
31
|
+
"check": "none",
|
|
32
|
+
"timeout": 2000
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dtu-findit",
|
|
3
|
+
"vendorUrl": "https://findit.dtu.dk/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https?://findit\\.dtu\\.dk/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": [],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": ".js-overlay .js-consent .js-consent-selected"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ".js-overlay .js-consent .js-consent-selected"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": ".js-consent .js-consent-allow"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"if": {
|
|
26
|
+
"exists": ".js-consent .js-consent-option.is-selected[data-value=stat]"
|
|
27
|
+
},
|
|
28
|
+
"then": [
|
|
29
|
+
{
|
|
30
|
+
"click": ".js-consent .js-consent-option.is-selected[data-value=stat]"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"waitForThenClick": ".js-consent .js-consent-selected"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"test": [
|
|
39
|
+
{
|
|
40
|
+
"cookieContains": "cks=req"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"cookieContains": "stat",
|
|
44
|
+
"negated": true
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hikvision.com",
|
|
3
|
+
"comment": "Variant without a reject button. The only dismiss control is an SVG close icon, which just hides the banner without storing a choice.",
|
|
4
|
+
"cosmetic": true,
|
|
5
|
+
"runContext": {
|
|
6
|
+
"main": true,
|
|
7
|
+
"frame": false,
|
|
8
|
+
"urlPattern": "^https?://(\\w+\\.)?hikvision\\.com/"
|
|
9
|
+
},
|
|
10
|
+
"prehideSelectors": [],
|
|
11
|
+
"detectCmp": [
|
|
12
|
+
{ "exists": "section.gdpr-wrapper .gdpr-button-accept" },
|
|
13
|
+
{ "exists": "section.gdpr-wrapper .gdpr-button-reject", "negated": true }
|
|
14
|
+
],
|
|
15
|
+
"detectPopup": [{ "visible": "section.gdpr-wrapper" }],
|
|
16
|
+
"optIn": [{ "waitForThenClick": "section.gdpr-wrapper .gdpr-button-accept" }],
|
|
17
|
+
"optOut": [{ "hide": "section.gdpr-wrapper" }]
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hurra-consent",
|
|
3
|
+
"_metadata": { "vendorUrl": "https://www.hurra.com/" },
|
|
4
|
+
"prehideSelectors": ["#JOISH987_bar_holder"],
|
|
5
|
+
"detectCmp": [{ "exists": "#JOISH987_bar_holder #JOISH987_bar" }],
|
|
6
|
+
"detectPopup": [{ "visible": "#JOISH987_bar_holder" }],
|
|
7
|
+
"optIn": [{ "waitForThenClick": "#JOISH987_acceptAllBar_btn" }],
|
|
8
|
+
"optOut": [
|
|
9
|
+
{
|
|
10
|
+
"if": { "visible": "#JOISH987_rejectBar_btn" },
|
|
11
|
+
"then": [{ "click": "#JOISH987_rejectBar_btn" }],
|
|
12
|
+
"else": [{ "waitForThenClick": "#JOISH987_inlineRejectBar_btn" }]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"test": [{ "waitForVisible": "#JOISH987_bar_holder", "timeout": 2000, "check": "none" }]
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "isidewith.com",
|
|
3
|
+
"runContext": {
|
|
4
|
+
"urlPattern": "^https?://(\\w+\\.)?isidewith\\.com/"
|
|
5
|
+
},
|
|
6
|
+
"prehideSelectors": [],
|
|
7
|
+
"detectCmp": [
|
|
8
|
+
{
|
|
9
|
+
"exists": ".overlayContent a[onclick^=\"optin\"]"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"detectPopup": [
|
|
13
|
+
{
|
|
14
|
+
"visible": ".overlayContent a[onclick^=\"optin\"]"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"optIn": [
|
|
18
|
+
{
|
|
19
|
+
"waitForThenClick": ".overlayContent a[onclick^=\"optin\"]"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"optOut": [
|
|
23
|
+
{
|
|
24
|
+
"waitForThenClick": ".overlayBG"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"waitForVisible": ".overlayContent a[onclick^=\"optin\"]",
|
|
28
|
+
"check": "none",
|
|
29
|
+
"timeout": 2000
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"test": [
|
|
33
|
+
{
|
|
34
|
+
"visible": ".overlayContent a[onclick^=\"optin\"]",
|
|
35
|
+
"check": "none"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "landgate",
|
|
3
|
+
"vendorUrl": "https://www.landgate.wa.gov.au/",
|
|
4
|
+
"prehideSelectors": [".privacy-notification[data-cookie-name]"],
|
|
5
|
+
"detectCmp": [{ "exists": ".privacy-notification[data-cookie-name] #js-privacy-notification-ok" }],
|
|
6
|
+
"detectPopup": [{ "visible": ".privacy-notification[data-cookie-name]" }],
|
|
7
|
+
"optIn": [{ "waitForThenClick": "#js-privacy-notification-ok" }],
|
|
8
|
+
"optOut": [{ "waitForThenClick": "#js-privacy-notification-ok" }],
|
|
9
|
+
"test": [{ "waitForVisible": ".privacy-notification[data-cookie-name]", "check": "none", "timeout": 1000 }]
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pakamera.pl",
|
|
3
|
+
"vendorUrl": "https://www.github.com/orestbida/cookieconsent",
|
|
4
|
+
"comment": "customized CookieConsent v3 with a renamed root container",
|
|
5
|
+
"runContext": {
|
|
6
|
+
"urlPattern": "^https?://(\\w+\\.)?pakamera\\.pl/"
|
|
7
|
+
},
|
|
8
|
+
"prehideSelectors": ["#ccpm"],
|
|
9
|
+
"detectCmp": [{ "exists": "#ccpm" }],
|
|
10
|
+
"detectPopup": [{ "visible": "html.show--consent #ccpm .cm__btn[data-role=all]" }],
|
|
11
|
+
"optIn": [{ "waitForThenClick": "#ccpm .cm__btn[data-role=all]" }],
|
|
12
|
+
"optOut": [
|
|
13
|
+
{ "waitForThenClick": "#ccpm .cm__btn[data-role=show]" },
|
|
14
|
+
{ "waitForVisible": "#ccpm .pm__btn[data-role=save]" },
|
|
15
|
+
{ "click": "#ccpm .pm input.section__toggle:checked:not(:disabled)", "all": true, "optional": true },
|
|
16
|
+
{ "click": "#ccpm .pm__btn[data-role=save]" }
|
|
17
|
+
],
|
|
18
|
+
"test": [{ "waitForVisible": "html.show--consent #ccpm .cm__btn[data-role=all]", "check": "none" }]
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "purecookie-cosmetic",
|
|
3
|
+
"cosmetic": true,
|
|
4
|
+
"prehideSelectors": ["#cookieConsentContainer"],
|
|
5
|
+
"detectCmp": [{ "exists": "#cookieConsentContainer [onclick^=\"purecookieDismiss\"], script[src*=\"purecookie\"]" }],
|
|
6
|
+
"detectPopup": [{ "visible": "#cookieConsentContainer" }],
|
|
7
|
+
"optIn": [
|
|
8
|
+
{ "waitFor": "#cookieConsentContainer[style*=\"opacity: 1;\"]", "timeout": 2000, "optional": true },
|
|
9
|
+
{ "waitForThenClick": "#cookieConsentContainer [onclick^=\"purecookieDismiss\"]" }
|
|
10
|
+
],
|
|
11
|
+
"optOut": [{ "hide": "#cookieConsentContainer" }],
|
|
12
|
+
"test": [{ "visible": "#cookieConsentContainer", "check": "none" }]
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "random-org",
|
|
3
|
+
"vendorUrl": "https://www.random.org/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https?://(\\w+\\.)?random\\.org/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": ["#cookie-banner"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": "#cookie-banner #cookie-banner-statistics"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": "#cookie-banner"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": "#cookie-banner button[onclick*=\"'all'\"]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"if": { "exists": "#cookie-banner-preferences:checked" },
|
|
26
|
+
"then": [{ "click": "#cookie-banner-preferences" }]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"if": { "exists": "#cookie-banner-statistics:checked" },
|
|
30
|
+
"then": [{ "click": "#cookie-banner-statistics" }]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"waitForThenClick": "#cookie-banner button[onclick*=\"'selected'\"]"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"test": [
|
|
37
|
+
{
|
|
38
|
+
"cookieContains": "RDOPRIVACY=%5Btrue%2Cfalse%2Cfalse%5D"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tallink",
|
|
3
|
+
"vendorUrl": "https://www.tallink.com/",
|
|
4
|
+
"prehideSelectors": ["#cms-web-consent-modal"],
|
|
5
|
+
"detectCmp": [{ "exists": "#cms-web-consent-root #cms-web-consent-modal" }],
|
|
6
|
+
"detectPopup": [{ "visible": "#cms-web-consent-modal" }],
|
|
7
|
+
"optIn": [{ "waitForThenClick": "#cms-web-consent-modal [data-cy=consent-agree-all]" }],
|
|
8
|
+
"optOut": [
|
|
9
|
+
{ "waitForThenClick": "#cms-web-consent-modal [data-cy=consent-agree-necessary]" },
|
|
10
|
+
{ "waitForVisible": "#cms-web-consent-modal", "check": "none", "timeout": 2000, "optional": true }
|
|
11
|
+
],
|
|
12
|
+
"test": [{ "cookieContains": "tlnk_cwc=necessary_cookies=true" }, { "cookieContains": "marketing_cookies=true", "negated": true }]
|
|
13
|
+
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
"name": "Tealium",
|
|
3
3
|
"prehideSelectors": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#__tealiumImplicitmodal,#consent-layer"],
|
|
4
4
|
"detectCmp": [{ "exists": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *,#__tealiumImplicitmodal *" }, { "eval": "EVAL_TEALIUM_0" }],
|
|
5
|
-
"detectPopup": [
|
|
5
|
+
"detectPopup": [
|
|
6
|
+
{ "visible": "#__tealiumGDPRecModal *,#__tealiumGDPRcpPrefs *,#__tealiumImplicitmodal *", "check": "any" },
|
|
7
|
+
{ "eval": "EVAL_TEALIUM_NO_DECISION" }
|
|
8
|
+
],
|
|
6
9
|
"optOut": [
|
|
7
10
|
{ "eval": "EVAL_TEALIUM_1" },
|
|
8
11
|
{ "eval": "EVAL_TEALIUM_DONOTSELL" },
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "typo3-cookieconsent",
|
|
3
|
+
"prehideSelectors": ["#js-cookieconsent"],
|
|
4
|
+
"detectCmp": [{ "exists": "#js-cookieconsent [data-cookieconsent-accept-none]" }],
|
|
5
|
+
"detectPopup": [{ "visible": "#js-cookieconsent" }],
|
|
6
|
+
"optIn": [{ "waitForThenClick": "#js-cookieconsent [data-cookieconsent-accept-all]" }],
|
|
7
|
+
"optOut": [{ "waitForThenClick": "#js-cookieconsent [data-cookieconsent-accept-none]" }],
|
|
8
|
+
"test": [{ "cookieContains": "CookieConsent=mandatory" }]
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vinnies-org-au",
|
|
3
|
+
"vendorUrl": "https://www.vinnies.org.au/",
|
|
4
|
+
"cosmetic": true,
|
|
5
|
+
"runContext": {
|
|
6
|
+
"urlPattern": "^https?://(\\w+\\.)?vinnies\\.org\\.au/"
|
|
7
|
+
},
|
|
8
|
+
"prehideSelectors": ["div.fixed.bottom-0:has(svg[data-icon=\"cookie-bite\"])"],
|
|
9
|
+
"detectCmp": [
|
|
10
|
+
{
|
|
11
|
+
"exists": "div.fixed.bottom-0:has(svg[data-icon=\"cookie-bite\"]) button"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"detectPopup": [
|
|
15
|
+
{
|
|
16
|
+
"visible": "div.fixed.bottom-0:has(svg[data-icon=\"cookie-bite\"])"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"optIn": [
|
|
20
|
+
{
|
|
21
|
+
"waitForThenClick": "div.fixed.bottom-0:has(svg[data-icon=\"cookie-bite\"]) button"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"optOut": [
|
|
25
|
+
{
|
|
26
|
+
"hide": "div.fixed.bottom-0:has(svg[data-icon=\"cookie-bite\"])"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|