From dd65be1ad9763717700bce2df58aae898ed5ef5f Mon Sep 17 00:00:00 2001 From: Maxim Tsoy Date: Thu, 17 Aug 2023 17:24:00 +0200 Subject: [PATCH] Move remaining eval rules to snippets --- lib/eval-snippets.ts | 85 +++++++++++++++++- rules/autoconsent/192.json | 46 ++++++---- rules/autoconsent/adroll.json | 38 ++++++-- rules/autoconsent/affinity-serif-com.json | 76 ++++++++-------- rules/autoconsent/axeptio.json | 36 ++++---- rules/autoconsent/bing.json | 46 +++++++--- rules/autoconsent/borlabs.json | 84 +++++++++--------- rules/autoconsent/bundesregierung-de.json | 52 +++++++---- rules/autoconsent/canva.json | 75 +++++++++++----- rules/autoconsent/clickio.json | 62 +++++++++---- rules/autoconsent/clinch.json | 2 +- rules/autoconsent/coinbase.json | 2 +- rules/autoconsent/complianz-banner.json | 41 ++++++--- rules/autoconsent/complianz-categories.json | 39 ++++++-- rules/autoconsent/complianz-optin.json | 54 +++++++++--- rules/autoconsent/cookie-law-info.json | 48 +++++++--- rules/autoconsent/cookie-manager-popup.json | 98 ++++++++++++--------- rules/autoconsent/cookiealert.json | 90 +++++++++---------- rules/autoconsent/cookiefirst.json | 37 +++++--- rules/autoconsent/cookieinformation.json | 47 +++++++--- rules/autoconsent/dailymotion.json | 54 +++++++----- rules/autoconsent/dsgvo.json | 50 +++++++---- rules/autoconsent/dunelm.json | 50 +++++++---- rules/autoconsent/etsy.json | 48 +++++++--- rules/autoconsent/eu-cookie-compliance.json | 46 +++++++--- rules/autoconsent/eu-cookie-law.json | 54 ++++++++---- rules/autoconsent/ezoic.json | 65 ++++++++++---- rules/autoconsent/google.json | 54 +++++++----- rules/autoconsent/iubenda.json | 58 +++++++----- rules/autoconsent/jquery-cookiebar.json | 62 ++++++++----- rules/autoconsent/mediavine.json | 55 ++++++++---- rules/autoconsent/microsoft.json | 36 ++++++-- rules/autoconsent/paypal.json | 54 ++++++++---- rules/autoconsent/primebox.json | 53 +++++++---- rules/autoconsent/pubtech.json | 77 ++++++++-------- rules/autoconsent/reddit.json | 54 +++++++----- rules/autoconsent/sibbo.json | 92 +++++++++++-------- rules/autoconsent/sirdata.json | 38 ++++++-- rules/autoconsent/snigel.json | 35 ++++++-- rules/autoconsent/steampowered.json | 47 +++++++--- rules/autoconsent/tarteaucitron.json | 49 +++++++---- rules/autoconsent/tealium.json | 44 +++++++-- rules/autoconsent/testcmp-cosmetic.json | 40 +++++++-- rules/autoconsent/testcmp.json | 40 +++++++-- rules/autoconsent/thefreedictionary.json | 36 +++++--- rules/autoconsent/theverge.json | 2 +- rules/autoconsent/ubuntu.com.json | 5 +- rules/autoconsent/uk-cookie-consent.json | 46 +++++++--- rules/autoconsent/usercentrics-api.json | 66 +++++++++----- rules/autoconsent/usercentrics-button.json | 40 ++++++--- rules/autoconsent/waitrose.json | 68 ++++++++------ rules/autoconsent/wp-cookie-notice.json | 40 ++++++--- rules/autoconsent/xing.json | 44 ++++++--- rules/autoconsent/youtube-desktop.json | 65 +++++++++----- rules/autoconsent/youtube-mobile.json | 60 ++++++++----- 55 files changed, 1867 insertions(+), 918 deletions(-) diff --git a/lib/eval-snippets.ts b/lib/eval-snippets.ts index 34d2e5d8..71281df5 100644 --- a/lib/eval-snippets.ts +++ b/lib/eval-snippets.ts @@ -1,6 +1,8 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck export const snippets = { + // code-based rules EVAL_0: () => console.log(1), EVAL_CONSENTMANAGER_1: () => window.__cmp && typeof __cmp("getCMPData") === "object", EVAL_CONSENTMANAGER_2: () => !__cmp('consentStatus').userChoiceExists, @@ -14,10 +16,89 @@ export const snippets = { EVAL_KLARO_1: () => klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name]), EVAL_ONETRUST_1: () => window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1, EVAL_TRUSTARC_TOP: () => window && window.truste && window.truste.eu.bindMap.prefCookie === '0', - + + // declarative rules + MEDIAVINE_0: () => document.querySelectorAll("[data-name=\"mediavine-gdpr-cmp\"] input[type=checkbox]").forEach(x => x.checked && x.click()) || true, + BORLABS_0: () => !JSON.parse(decodeURIComponent(document.cookie.split(';').find(c => c.indexOf('borlabs-cookie') !== -1).split('=', 2)[1])).consents.statistics, + COOKIEALERT_0: () => document.querySelector('body').removeAttribute('style') || true, + COOKIEALERT_1: () => document.querySelector('body').removeAttribute('style') || true, + COOKIEALERT_2: () => window.CookieConsent.declined === true, + SNIGEL_0: () => !!document.cookie.match('snconsent'), + DSGVO_0: () => !document.cookie.includes('sp_dsgvo_cookie_settings'), + ADROLL_0: () => !document.cookie.includes('__adroll_fpc'), + EU_COOKIE_LAW_0: () => !document.cookie.includes('euCookie'), + PRIMEBOX_0: () => !document.cookie.includes('cb-enabled=accepted'), + CLINCH_0: () => document.cookie.includes('ctc_rejected=1'), + THEFREEDICTIONARY_0: () => cmpUi.showPurposes() || cmpUi.rejectAll() || true, + THEFREEDICTIONARY_1: () => cmpUi.allowAll() || true, + SIBBO_0: () => !!window.localStorage.getItem('euconsent-v2'), + BING_0: () => document.cookie.includes('AL=0') && document.cookie.includes('AD=0') && document.cookie.includes('SM=0'), + PAYPAL_0: () => document.cookie.includes('cookie_prefs') === true, + DUNELM_0: () => document.cookie.includes('cc_functional=0') && document.cookie.includes('cc_targeting=0'), + AXEPTIO_0: () => document.cookie.includes('axeptio_authorized_vendors=%2C%2C'), + UBUNTU_COM_0: () => document.cookie === '_cookies_accepted=essential', + IUBENDA_0: () => document.querySelectorAll('.purposes-item input[type=checkbox]:not([disabled])').forEach(x => {if(x.checked) x.click()}) || true, + IUBENDA_1: () => !!document.cookie.match(/_iub_cs-\d+=/), + CLICKIO_0: () => document.cookie.includes('__lxG__consent__v2_daisybit='), + YOUTUBE_MOBILE_0: () => !!document.cookie.match(/SOCS=CAE/), + STEAMPOWERED_0: () => JSON.parse(decodeURIComponent(document.cookie.split(';').find(s => s.trim().startsWith('cookieSettings')).split('=')[1])).preference_state === 2, + TARTEAUCITRON_0: () => tarteaucitron.userInterface.respondAll(false) || true, + TARTEAUCITRON_1: () => tarteaucitron.userInterface.respondAll(true) || true, + TARTEAUCITRON_2: () => document.cookie.match(/tarteaucitron=[^;]*/)[0].includes('false'), + COOKIE_LAW_INFO_0: () => CLI.disableAllCookies() || CLI.reject_close() || true, + COOKIE_LAW_INFO_1: () => document.cookie.indexOf('cookielawinfo-checkbox-non-necessary=yes') === -1, + DAILYMOTION_0: () => !!document.cookie.match('dm-euconsent-v2'), + COOKIEFIRST_1: () => document.querySelectorAll('button[data-cookiefirst-accent-color=true][role=checkbox]:not([disabled])').forEach(i => (i.getAttribute('aria-checked') == 'true' && i.click())) || true, + COOKIEFIRST_0: () => ((o)=>o.performance === false && o.functional === false && o.advertising === false) (JSON.parse(decodeURIComponent(document.cookie.split(';').find(c => c.indexOf('cookiefirst') !== -1).trim()).split('=')[1])), + ETSY_0: () => document.querySelectorAll(".gdpr-overlay-body input").forEach(toggle => { toggle.checked = false; }) || true, + ETSY_1: () => document.querySelector('.gdpr-overlay-view button[data-wt-overlay-close]').click() || true, + EZOIC_0: () => ezCMP.handleAcceptAllClick(), + EZOIC_1: () => !!document.cookie.match(/ezCMPCookieConsent=[^;]+\|2=0\|3=0\|4=0/), + COOKIE_MANAGER_POPUP_0: () => JSON.parse(document.cookie.split(';').find(c => c.trim().startsWith('CookieLevel')).split('=')[1]).social === false, + AFFINITY_SERIF_COM_0: () => document.cookie.includes('serif_manage_cookies_viewed') && !document.cookie.includes('serif_allow_analytics'), + COMPLIANZ_CATEGORIES_0: () => !!document.cookie.match(/cmplz_[^=]+=deny/), + BUNDESREGIERUNG_DE_0: () => document.cookie.match('cookie-allow-tracking=0'), + USERCENTRICS_BUTTON_0: () => JSON.parse(localStorage.getItem('usercentrics')).consents.every(c => c.isEssential || !c.consentStatus), + WAITROSE_0: () => Array.from(document.querySelectorAll('label[id$=cookies-deny-label]')).forEach(e => e.click()) || true, + WAITROSE_1: () => document.cookie.includes('wtr_cookies_advertising=0') && document.cookie.includes('wtr_cookies_analytics=0'), + COINBASE_0: () => JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1, + COMPLIANZ_BANNER_0: () => document.cookie.includes('cmplz_banner-status=dismissed'), + JQUERY_COOKIEBAR_0: () => !document.cookie.includes('cookies-state=accepted'), + SIRDATA_0: () => document.cookie.includes('euconsent-v2'), + TESTCMP_COSMETIC_0: () => window.results.results[0] === 'banner_hidden', + WP_COOKIE_NOTICE_0: () => document.cookie.includes('wpl_viewed_cookie=no'), + THEVERGE_0: () => document.cookie.includes('_duet_gdpr_acknowledged=1'), + 192_0: () => document.cookie.includes('CC_ADVERTISING=NO') && document.cookie.includes('CC_ANALYTICS=NO'), + USERCENTRICS_API_0: () => typeof UC_UI === 'object', + USERCENTRICS_API_1: () => !!UC_UI.closeCMP(), + USERCENTRICS_API_2: () => !!UC_UI.denyAllConsents(), + USERCENTRICS_API_3: () => !!UC_UI.acceptAllConsents(), + USERCENTRICS_API_4: () => !!UC_UI.closeCMP(), + USERCENTRICS_API_5: () => UC_UI.areAllConsentsAccepted() === true, + USERCENTRICS_API_6: () => UC_UI.areAllConsentsAccepted() === false, + MICROSOFT_0: () => Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Reject|Ablehnen'))[0].click() || true, + MICROSOFT_1: () => Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Accept|Annehmen'))[0].click() || true, + MICROSOFT_2: () => !!document.cookie.match('MSCC'), + COOKIEINFORMATION_0: () => CookieInformation.declineAllCategories() || true, + COOKIEINFORMATION_1: () => CookieInformation.submitAllCategories() || true, + COOKIEINFORMATION_2: () => document.cookie.includes('CookieInformationConsent='), + YOUTUBE_DESKTOP_0: () => !!document.cookie.match(/SOCS=CAE/), + UK_COOKIE_CONSENT_0: () => !document.cookie.includes('catAccCookies'), + EU_COOKIE_COMPLIANCE_0: () => document.cookie.indexOf('cookie-agreed=2') === -1, + REDDIT_0: () => document.cookie.includes('eu_cookie={%22opted%22:true%2C%22nonessential%22:false}'), + GOOGLE_0: () => !!document.cookie.match(/SOCS=CAE/), + PUBTECH_0: () => document.cookie.includes('euconsent-v2') && (document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)) , + TEALIUM_0: () => typeof window.utag !== 'undefined' && typeof utag.gdpr === 'object', + TEALIUM_1: () => utag.gdpr.setConsentValue(false) || true, + TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true, + TEALIUM_3: () => utag.gdpr.getConsentState() !== 1, + TESTCMP_0: () => window.results.results[0] === 'button_clicked', + CANVA_0: () => !document.cookie.includes('gtm_fpc_engagement_event'), + COMPLIANZ_OPTIN_0: () => !!document.cookie.match(/cookieconsent_preferences_disabled=[^;]+/), + XING_0: () => document.cookie.includes('userConsent=%7B%22marketing%22%3Afalse'), } export function getFunctionBody(snippetFunc: () => any) { const snippetStr = snippetFunc.toString(); - return snippetStr.substring(snippetStr.indexOf("()=>") + 4); + return snippetStr.substring(snippetStr.indexOf("=>") + 2); } diff --git a/rules/autoconsent/192.json b/rules/autoconsent/192.json index dd714f51..e94ac4aa 100644 --- a/rules/autoconsent/192.json +++ b/rules/autoconsent/192.json @@ -1,17 +1,31 @@ { - "name": "192.com", - "detectCmp": [{ "exists": ".ont-cookies"}], - "detectPopup": [{ "visible": ".ont-cookies" }], - "optIn": [{ "click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-ok2" }], - "optOut": [ - { - "click": ".ont-cookes-btn-manage" - }, - { - "click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-choose" - } - ], - "test": [ - {"eval": "document.cookie.includes('CC_ADVERTISING=NO') && document.cookie.includes('CC_ANALYTICS=NO')"} - ] -} + "name": "192.com", + "detectCmp": [ + { + "exists": ".ont-cookies" + } + ], + "detectPopup": [ + { + "visible": ".ont-cookies" + } + ], + "optIn": [ + { + "click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-ok2" + } + ], + "optOut": [ + { + "click": ".ont-cookes-btn-manage" + }, + { + "click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-choose" + } + ], + "test": [ + { + "eval": "192_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/adroll.json b/rules/autoconsent/adroll.json index cba4fe7b..c4b31a08 100644 --- a/rules/autoconsent/adroll.json +++ b/rules/autoconsent/adroll.json @@ -1,11 +1,31 @@ { - "name": "Adroll", - "prehideSelectors": ["#adroll_consent_container"], - "detectCmp": [{ "exists": "#adroll_consent_container" }], - "detectPopup": [{ "visible": "#adroll_consent_container" }], - "optIn": [ { "waitForThenClick": "#adroll_consent_accept" } ], - "optOut": [ { "waitForThenClick": "#adroll_consent_reject" } ], - "test": [ - { "eval": "!document.cookie.includes('__adroll_fpc')" } - ] + "name": "Adroll", + "prehideSelectors": [ + "#adroll_consent_container" + ], + "detectCmp": [ + { + "exists": "#adroll_consent_container" + } + ], + "detectPopup": [ + { + "visible": "#adroll_consent_container" + } + ], + "optIn": [ + { + "waitForThenClick": "#adroll_consent_accept" + } + ], + "optOut": [ + { + "waitForThenClick": "#adroll_consent_reject" + } + ], + "test": [ + { + "eval": "ADROLL_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/affinity-serif-com.json b/rules/autoconsent/affinity-serif-com.json index f2097deb..d30f5b12 100644 --- a/rules/autoconsent/affinity-serif-com.json +++ b/rules/autoconsent/affinity-serif-com.json @@ -1,37 +1,41 @@ { - "name": "affinity.serif.com", - "detectCmp": [ - { - "exists": ".c-cookie-banner button[data-qa='allow-all-cookies']" - } - ], - "detectPopup": [ - { "visible": ".c-cookie-banner" } - ], - "optIn": [ - { "click": "button[data-qa=\"allow-all-cookies\"]" } - ], - "optOut": [ - { - "click": "button[data-qa=\"manage-cookies\"]" - }, - { - "waitFor": ".c-cookie-banner ~ [role=\"dialog\"]" - }, - { - "waitForThenClick": ".c-cookie-banner ~ [role=\"dialog\"] input[type=\"checkbox\"][value=\"true\"]", - "all": true - }, - { - "click": ".c-cookie-banner ~ [role=\"dialog\"] .c-modal__action button" - } - ], - "test": [ - { - "wait": 500 - }, - { - "eval": "document.cookie.includes('serif_manage_cookies_viewed') && !document.cookie.includes('serif_allow_analytics')" - } - ] -} + "name": "affinity.serif.com", + "detectCmp": [ + { + "exists": ".c-cookie-banner button[data-qa='allow-all-cookies']" + } + ], + "detectPopup": [ + { + "visible": ".c-cookie-banner" + } + ], + "optIn": [ + { + "click": "button[data-qa=\"allow-all-cookies\"]" + } + ], + "optOut": [ + { + "click": "button[data-qa=\"manage-cookies\"]" + }, + { + "waitFor": ".c-cookie-banner ~ [role=\"dialog\"]" + }, + { + "waitForThenClick": ".c-cookie-banner ~ [role=\"dialog\"] input[type=\"checkbox\"][value=\"true\"]", + "all": true + }, + { + "click": ".c-cookie-banner ~ [role=\"dialog\"] .c-modal__action button" + } + ], + "test": [ + { + "wait": 500 + }, + { + "eval": "AFFINITY_SERIF_COM_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/axeptio.json b/rules/autoconsent/axeptio.json index 649c4de2..ddb7d553 100644 --- a/rules/autoconsent/axeptio.json +++ b/rules/autoconsent/axeptio.json @@ -1,41 +1,37 @@ { "name": "axeptio", - "prehideSelectors": [".axeptio_widget"], - "detectCmp": - [ - { - "exists": ".axeptio_widget" + "prehideSelectors": [ + ".axeptio_widget" + ], + "detectCmp": [ + { + "exists": ".axeptio_widget" } ], - "detectPopup": - [ - { - "visible": ".axeptio_widget" + "detectPopup": [ + { + "visible": ".axeptio_widget" } ], - "optIn": - [ + "optIn": [ { - "waitFor": ".axeptio-widget--open" + "waitFor": ".axeptio-widget--open" }, { "click": "button#axeptio_btn_acceptAll" } ], - "optOut": - [ - + "optOut": [ { - "waitFor": ".axeptio-widget--open" + "waitFor": ".axeptio-widget--open" }, { "click": "button#axeptio_btn_dismiss" } ], - "test": - [ + "test": [ { - "eval": "document.cookie.includes('axeptio_authorized_vendors=%2C%2C')" + "eval": "AXEPTIO_0" } ] - } \ No newline at end of file +} \ No newline at end of file diff --git a/rules/autoconsent/bing.json b/rules/autoconsent/bing.json index 521b68bc..164c45ae 100644 --- a/rules/autoconsent/bing.json +++ b/rules/autoconsent/bing.json @@ -1,14 +1,34 @@ { - "name": "bing.com", - "prehideSelectors": ["#bnp_container"], - "detectCmp": [{ "exists": "#bnp_cookie_banner"}], - "detectPopup": [{ "visible": "#bnp_cookie_banner" }], - "optIn": [{ "click": "#bnp_btn_accept" }], - "optOut": [ - { "click": "#bnp_btn_preference"}, - { "click": "#mcp_savesettings"} - ], - "test": [ - { "eval": "document.cookie.includes('AL=0') && document.cookie.includes('AD=0') && document.cookie.includes('SM=0')"} - ] -} + "name": "bing.com", + "prehideSelectors": [ + "#bnp_container" + ], + "detectCmp": [ + { + "exists": "#bnp_cookie_banner" + } + ], + "detectPopup": [ + { + "visible": "#bnp_cookie_banner" + } + ], + "optIn": [ + { + "click": "#bnp_btn_accept" + } + ], + "optOut": [ + { + "click": "#bnp_btn_preference" + }, + { + "click": "#mcp_savesettings" + } + ], + "test": [ + { + "eval": "BING_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/borlabs.json b/rules/autoconsent/borlabs.json index 6146918d..4ae5a0d0 100644 --- a/rules/autoconsent/borlabs.json +++ b/rules/autoconsent/borlabs.json @@ -1,43 +1,45 @@ { - "name": "borlabs", - "detectCmp": [ - { - "exists": "._brlbs-block-content" - } - ], - "detectPopup": [ - { - "visible": "._brlbs-bar-wrap,._brlbs-box-wrap" - } - ], - "optIn": [ - { - "click": "a[data-cookie-accept-all]" - } - ], - "optOut": [ - { - "click": "a[data-cookie-individual]" - }, - { - "waitForVisible": ".cookie-preference" - }, - { - "click": "input[data-borlabs-cookie-checkbox]:checked", - "all": true, - "optional": true - }, - { - "click": "#CookiePrefSave" - }, - { - "wait": 500 - } - ], - "prehideSelectors": [ - "#BorlabsCookieBox" - ], - "test": [{ - "eval": "!JSON.parse(decodeURIComponent(document.cookie.split(';').find(c => c.indexOf('borlabs-cookie') !== -1).split('=', 2)[1])).consents.statistics" - }] + "name": "borlabs", + "detectCmp": [ + { + "exists": "._brlbs-block-content" + } + ], + "detectPopup": [ + { + "visible": "._brlbs-bar-wrap,._brlbs-box-wrap" + } + ], + "optIn": [ + { + "click": "a[data-cookie-accept-all]" + } + ], + "optOut": [ + { + "click": "a[data-cookie-individual]" + }, + { + "waitForVisible": ".cookie-preference" + }, + { + "click": "input[data-borlabs-cookie-checkbox]:checked", + "all": true, + "optional": true + }, + { + "click": "#CookiePrefSave" + }, + { + "wait": 500 + } + ], + "prehideSelectors": [ + "#BorlabsCookieBox" + ], + "test": [ + { + "eval": "BORLABS_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/bundesregierung-de.json b/rules/autoconsent/bundesregierung-de.json index 22060de8..f03d0d37 100644 --- a/rules/autoconsent/bundesregierung-de.json +++ b/rules/autoconsent/bundesregierung-de.json @@ -1,19 +1,35 @@ { - "name": "bundesregierung.de", - "prehideSelectors": [".bpa-cookie-banner"], - "detectCmp": [{ "exists": ".bpa-cookie-banner" }], - "detectPopup": [{ "visible": ".bpa-cookie-banner .bpa-module-full-hero" }], - "optIn": [{ "click": ".bpa-accept-all-button" }], - "optOut": [ - { - "wait": 500, - "comment": "click is not immediately recognized" - }, - { - "waitForThenClick": ".bpa-close-button" - } - ], - "test": [ - {"eval": "document.cookie.match('cookie-allow-tracking=0')"} - ] -} + "name": "bundesregierung.de", + "prehideSelectors": [ + ".bpa-cookie-banner" + ], + "detectCmp": [ + { + "exists": ".bpa-cookie-banner" + } + ], + "detectPopup": [ + { + "visible": ".bpa-cookie-banner .bpa-module-full-hero" + } + ], + "optIn": [ + { + "click": ".bpa-accept-all-button" + } + ], + "optOut": [ + { + "wait": 500, + "comment": "click is not immediately recognized" + }, + { + "waitForThenClick": ".bpa-close-button" + } + ], + "test": [ + { + "eval": "BUNDESREGIERUNG_DE_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/canva.json b/rules/autoconsent/canva.json index 49b767d3..0c9fee68 100644 --- a/rules/autoconsent/canva.json +++ b/rules/autoconsent/canva.json @@ -1,25 +1,52 @@ { - "name": "canva.com", - "prehideSelectors": ["div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]"], - "detectCmp": [{ "exists": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]" }], - "detectPopup": [{ "exists": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]" }], - "optIn": [ - { "click": "div[role=\"dialog\"] button:nth-child(1)" } - ], - "optOut": [ - { - "if": { "exists": "div[role=\"dialog\"] button:nth-child(3)" }, - "then": [{ "click": "div[role=\"dialog\"] button:nth-child(2)" }], - "else": [ - { "click": "div[role=\"dialog\"] button:nth-child(2)" }, - { "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"privacy-policy\"]" }, - { "click": "div[role=\"dialog\"] button:nth-child(2)" }, - { "click": "div[role=\"dialog\"] div:last-child button:only-child" } - ] - } - ], - "test": [ - { "eval": "!document.cookie.includes('gtm_fpc_engagement_event')" } - ] -} - \ No newline at end of file + "name": "canva.com", + "prehideSelectors": [ + "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]" + ], + "detectCmp": [ + { + "exists": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]" + } + ], + "detectPopup": [ + { + "exists": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]" + } + ], + "optIn": [ + { + "click": "div[role=\"dialog\"] button:nth-child(1)" + } + ], + "optOut": [ + { + "if": { + "exists": "div[role=\"dialog\"] button:nth-child(3)" + }, + "then": [ + { + "click": "div[role=\"dialog\"] button:nth-child(2)" + } + ], + "else": [ + { + "click": "div[role=\"dialog\"] button:nth-child(2)" + }, + { + "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"privacy-policy\"]" + }, + { + "click": "div[role=\"dialog\"] button:nth-child(2)" + }, + { + "click": "div[role=\"dialog\"] div:last-child button:only-child" + } + ] + } + ], + "test": [ + { + "eval": "CANVA_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/clickio.json b/rules/autoconsent/clickio.json index 4648ae35..fa2df45c 100644 --- a/rules/autoconsent/clickio.json +++ b/rules/autoconsent/clickio.json @@ -1,18 +1,48 @@ { - "name": "click.io", - "prehideSelectors": ["#cl-consent"], - "detectCmp": [{ "exists": "#cl-consent" }], - "detectPopup": [{ "visible": "#cl-consent" }], - "optIn": [ { "waitForThenClick": "#cl-consent [data-role=\"b_agree\"]" } ], - "optOut": [ - { "waitFor": "#cl-consent [data-role=\"b_options\"]" }, - { "wait": 500 }, - { "click": "#cl-consent [data-role=\"b_options\"]" }, - { "waitFor": ".cl-consent-popup.cl-consent-visible [data-role=\"alloff\"]" }, - { "click": ".cl-consent-popup.cl-consent-visible [data-role=\"alloff\"]", "all": true }, - { "click": "[data-role=\"b_save\"]" } - ], - "test": [ - { "eval": "document.cookie.includes('__lxG__consent__v2_daisybit=')", "comment": "TODO: this only checks if we interacted at all" } - ] + "name": "click.io", + "prehideSelectors": [ + "#cl-consent" + ], + "detectCmp": [ + { + "exists": "#cl-consent" + } + ], + "detectPopup": [ + { + "visible": "#cl-consent" + } + ], + "optIn": [ + { + "waitForThenClick": "#cl-consent [data-role=\"b_agree\"]" + } + ], + "optOut": [ + { + "waitFor": "#cl-consent [data-role=\"b_options\"]" + }, + { + "wait": 500 + }, + { + "click": "#cl-consent [data-role=\"b_options\"]" + }, + { + "waitFor": ".cl-consent-popup.cl-consent-visible [data-role=\"alloff\"]" + }, + { + "click": ".cl-consent-popup.cl-consent-visible [data-role=\"alloff\"]", + "all": true + }, + { + "click": "[data-role=\"b_save\"]" + } + ], + "test": [ + { + "eval": "CLICKIO_0", + "comment": "TODO: this only checks if we interacted at all" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/clinch.json b/rules/autoconsent/clinch.json index 5c28842b..420d0ca5 100644 --- a/rules/autoconsent/clinch.json +++ b/rules/autoconsent/clinch.json @@ -38,7 +38,7 @@ ], "test": [ { - "eval": "document.cookie.includes('ctc_rejected=1')" + "eval": "CLINCH_0" } ] } \ No newline at end of file diff --git a/rules/autoconsent/coinbase.json b/rules/autoconsent/coinbase.json index d1fc49ec..2a7fd0c2 100644 --- a/rules/autoconsent/coinbase.json +++ b/rules/autoconsent/coinbase.json @@ -37,7 +37,7 @@ ], "test": [ { - "eval": "JSON.parse(decodeURIComponent(document.cookie.match(/cm_(eu|default)_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[2])).consent.length <= 1" + "eval": "COINBASE_0" } ] } \ No newline at end of file diff --git a/rules/autoconsent/complianz-banner.json b/rules/autoconsent/complianz-banner.json index bbd64149..a55aea4c 100644 --- a/rules/autoconsent/complianz-banner.json +++ b/rules/autoconsent/complianz-banner.json @@ -1,13 +1,32 @@ { - "name": "Complianz banner", - "prehideSelectors": ["#cmplz-cookiebanner-container"], - "detectCmp": [{ "exists": "#cmplz-cookiebanner-container .cmplz-cookiebanner" }], - "detectPopup": [{ "visible": "#cmplz-cookiebanner-container .cmplz-cookiebanner", "check": "any" }], - "optIn": [ - { "waitForThenClick": ".cmplz-cookiebanner .cmplz-accept" } - ], - "optOut": [ - { "waitForThenClick": ".cmplz-cookiebanner .cmplz-deny" } - ], - "test": [ { "eval": "document.cookie.includes('cmplz_banner-status=dismissed')" } ] + "name": "Complianz banner", + "prehideSelectors": [ + "#cmplz-cookiebanner-container" + ], + "detectCmp": [ + { + "exists": "#cmplz-cookiebanner-container .cmplz-cookiebanner" + } + ], + "detectPopup": [ + { + "visible": "#cmplz-cookiebanner-container .cmplz-cookiebanner", + "check": "any" + } + ], + "optIn": [ + { + "waitForThenClick": ".cmplz-cookiebanner .cmplz-accept" + } + ], + "optOut": [ + { + "waitForThenClick": ".cmplz-cookiebanner .cmplz-deny" + } + ], + "test": [ + { + "eval": "COMPLIANZ_BANNER_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/complianz-categories.json b/rules/autoconsent/complianz-categories.json index ed9a6946..996e279d 100644 --- a/rules/autoconsent/complianz-categories.json +++ b/rules/autoconsent/complianz-categories.json @@ -1,17 +1,40 @@ { "name": "Complianz categories", - "prehideSelectors": [".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]"], - "detectCmp": [{ "exists": ".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]" }], - "detectPopup": [{ "visible": ".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]" }], + "prehideSelectors": [ + ".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]" + ], + "detectCmp": [ + { + "exists": ".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]" + } + ], + "detectPopup": [ + { + "visible": ".cc-type-categories[aria-describedby=\"cookieconsent:desc\"]" + } + ], "optIn": [ - { "click": ".cc-accept-all", "optional": true }, - { "click": ".cc-allow", "optional": true }, - { "click": ".cc-dismiss", "optional": true } + { + "click": ".cc-accept-all", + "optional": true + }, + { + "click": ".cc-allow", + "optional": true + }, + { + "click": ".cc-dismiss", + "optional": true + } ], "optOut": [ - { "click": ".cc-dismiss" } + { + "click": ".cc-dismiss" + } ], "test": [ - { "eval": "!!document.cookie.match(/cmplz_[^=]+=deny/)" } + { + "eval": "COMPLIANZ_CATEGORIES_0" + } ] } \ No newline at end of file diff --git a/rules/autoconsent/complianz-optin.json b/rules/autoconsent/complianz-optin.json index 65aae251..10fcc062 100644 --- a/rules/autoconsent/complianz-optin.json +++ b/rules/autoconsent/complianz-optin.json @@ -1,20 +1,52 @@ { "name": "Complianz optin", - "prehideSelectors": [".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]"], - "detectCmp": [{ "exists": ".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]" }], - "detectPopup": [{ "visible": ".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]" }], + "prehideSelectors": [ + ".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]" + ], + "detectCmp": [ + { + "exists": ".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]" + } + ], + "detectPopup": [ + { + "visible": ".cc-type-opt-in[aria-describedby=\"cookieconsent:desc\"]" + } + ], "optIn": [ - { "click": ".cc-accept-all", "optional": true }, - { "click": ".cc-allow", "optional": true }, - { "click": ".cc-dismiss", "optional": true } + { + "click": ".cc-accept-all", + "optional": true + }, + { + "click": ".cc-allow", + "optional": true + }, + { + "click": ".cc-dismiss", + "optional": true + } ], "optOut": [ - { "click": ".cc-settings" }, - { "waitForVisible": "[aria-label=\"cookies preferences popup\"]" }, - { "click": "[aria-label=\"cookies preferences popup\"] input[type=checkbox]:not([disabled]):checked", "all": true, "optional": true }, - { "click": "[aria-label=\"cookies preferences popup\"] [aria-label=\"Accept Selected\"], [aria-label=\"cookies preferences popup\"] [aria-label=\"Save my choice\"], .cc-btn-accept-selected, .cc-deny", "optional": true } + { + "click": ".cc-settings" + }, + { + "waitForVisible": "[aria-label=\"cookies preferences popup\"]" + }, + { + "click": "[aria-label=\"cookies preferences popup\"] input[type=checkbox]:not([disabled]):checked", + "all": true, + "optional": true + }, + { + "click": "[aria-label=\"cookies preferences popup\"] [aria-label=\"Accept Selected\"], [aria-label=\"cookies preferences popup\"] [aria-label=\"Save my choice\"], .cc-btn-accept-selected, .cc-deny", + "optional": true + } ], "test": [ - { "eval": "!!document.cookie.match(/cookieconsent_preferences_disabled=[^;]+/)" } + { + "eval": "COMPLIANZ_OPTIN_0" + } ] } \ No newline at end of file diff --git a/rules/autoconsent/cookie-law-info.json b/rules/autoconsent/cookie-law-info.json index 5862b2cc..160d7a05 100644 --- a/rules/autoconsent/cookie-law-info.json +++ b/rules/autoconsent/cookie-law-info.json @@ -1,14 +1,36 @@ { - "name": "cookie-law-info", - "prehideSelectors": ["#cookie-law-info-bar"], - "detectCmp": [{ "exists": "#cookie-law-info-bar" }], - "detectPopup": [{ "visible": "#cookie-law-info-bar" }], - "optIn": [{ "click": "[data-cli_action=\"accept_all\"]" }], - "optOut": [ - { "hide": ["#cookie-law-info-bar"] }, - { - "eval": "CLI.disableAllCookies() || CLI.reject_close() || true" - } - ], - "test": [{ "eval": "document.cookie.indexOf('cookielawinfo-checkbox-non-necessary=yes') === -1" }] -} + "name": "cookie-law-info", + "prehideSelectors": [ + "#cookie-law-info-bar" + ], + "detectCmp": [ + { + "exists": "#cookie-law-info-bar" + } + ], + "detectPopup": [ + { + "visible": "#cookie-law-info-bar" + } + ], + "optIn": [ + { + "click": "[data-cli_action=\"accept_all\"]" + } + ], + "optOut": [ + { + "hide": [ + "#cookie-law-info-bar" + ] + }, + { + "eval": "COOKIE_LAW_INFO_0" + } + ], + "test": [ + { + "eval": "COOKIE_LAW_INFO_1" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/cookie-manager-popup.json b/rules/autoconsent/cookie-manager-popup.json index 1d147ac1..2a4b14c2 100644 --- a/rules/autoconsent/cookie-manager-popup.json +++ b/rules/autoconsent/cookie-manager-popup.json @@ -1,42 +1,60 @@ { - "name": "cookie-manager-popup", - "cosmetic": false, - "runContext": { - "main": true, - "frame": false - }, - "intermediate": false, - "detectCmp": [ - { - "exists": "#notice-cookie-block #allow-functional-cookies, #notice-cookie-block #btn-cookie-settings" - } - ], - "detectPopup": [ - { - "visible": "#notice-cookie-block" - } - ], - "optIn": [ - { - "click": "#btn-cookie-allow" - } - ], - "optOut": [ - { - "if": { - "exists": "#allow-functional-cookies" - }, - "then": [{ "click": "#allow-functional-cookies" }], - "else": [ - { "waitForThenClick": "#btn-cookie-settings" }, - { "waitForVisible": ".modal-body" }, - { "click": ".modal-body input:checked, .switch[data-switch=\"on\"]", "all": true, "optional": true }, - { "click": "[role=\"dialog\"] .modal-footer button"} - ] - } - ], - "prehideSelectors": ["#btn-cookie-settings"], - "test": [{ - "eval": "JSON.parse(document.cookie.split(';').find(c => c.trim().startsWith('CookieLevel')).split('=')[1]).social === false" - }] + "name": "cookie-manager-popup", + "cosmetic": false, + "runContext": { + "main": true, + "frame": false + }, + "intermediate": false, + "detectCmp": [ + { + "exists": "#notice-cookie-block #allow-functional-cookies, #notice-cookie-block #btn-cookie-settings" + } + ], + "detectPopup": [ + { + "visible": "#notice-cookie-block" + } + ], + "optIn": [ + { + "click": "#btn-cookie-allow" + } + ], + "optOut": [ + { + "if": { + "exists": "#allow-functional-cookies" + }, + "then": [ + { + "click": "#allow-functional-cookies" + } + ], + "else": [ + { + "waitForThenClick": "#btn-cookie-settings" + }, + { + "waitForVisible": ".modal-body" + }, + { + "click": ".modal-body input:checked, .switch[data-switch=\"on\"]", + "all": true, + "optional": true + }, + { + "click": "[role=\"dialog\"] .modal-footer button" + } + ] + } + ], + "prehideSelectors": [ + "#btn-cookie-settings" + ], + "test": [ + { + "eval": "COOKIE_MANAGER_POPUP_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/cookiealert.json b/rules/autoconsent/cookiealert.json index 68207ab9..88b6d526 100644 --- a/rules/autoconsent/cookiealert.json +++ b/rules/autoconsent/cookiealert.json @@ -1,48 +1,48 @@ { - "name": "cookiealert", - "intermediate": false, - "prehideSelectors": [], - "runContext": { - "frame": true, - "main": true - }, - "detectCmp": [ - { - "exists": ".cookie-alert-extended" - } - ], - "detectPopup": [ - { - "visible": ".cookie-alert-extended-modal" - } - ], - "optIn": [ - { - "click": "button[data-controller='cookie-alert/extended/button/accept']" + "name": "cookiealert", + "intermediate": false, + "prehideSelectors": [], + "runContext": { + "frame": true, + "main": true }, - { - "eval": "document.querySelector('body').removeAttribute('style') || true" - } - ], - "optOut": [ - { - "click": "a[data-controller='cookie-alert/extended/detail-link']" - }, - { - "click": ".cookie-alert-configuration-input:checked", - "all": true, - "optional": true - }, - { - "click": "button[data-controller='cookie-alert/extended/button/configuration']" - }, - { - "eval": "document.querySelector('body').removeAttribute('style') || true" - } - ], - "test": [ - { - "eval": "window.CookieConsent.declined === true" - } - ] + "detectCmp": [ + { + "exists": ".cookie-alert-extended" + } + ], + "detectPopup": [ + { + "visible": ".cookie-alert-extended-modal" + } + ], + "optIn": [ + { + "click": "button[data-controller='cookie-alert/extended/button/accept']" + }, + { + "eval": "COOKIEALERT_1" + } + ], + "optOut": [ + { + "click": "a[data-controller='cookie-alert/extended/detail-link']" + }, + { + "click": ".cookie-alert-configuration-input:checked", + "all": true, + "optional": true + }, + { + "click": "button[data-controller='cookie-alert/extended/button/configuration']" + }, + { + "eval": "COOKIEALERT_0" + } + ], + "test": [ + { + "eval": "COOKIEALERT_2" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/cookiefirst.json b/rules/autoconsent/cookiefirst.json index f0dfee75..c80a4d24 100644 --- a/rules/autoconsent/cookiefirst.json +++ b/rules/autoconsent/cookiefirst.json @@ -1,24 +1,38 @@ { "name": "cookiefirst.com", - "prehideSelectors": ["#cookiefirst-root"], - "detectCmp": [{ "exists": "#cookiefirst-root" }], - "detectPopup": [{ "visible": "#cookiefirst-root" }], - "optIn": [{ "click": "button[data-cookiefirst-action=accept]" }], + "prehideSelectors": [ + "#cookiefirst-root,.cookiefirst-root,[aria-labelledby=cookie-preference-panel-title]" + ], + "detectCmp": [ + { + "exists": "#cookiefirst-root,.cookiefirst-root" + } + ], + "detectPopup": [ + { + "visible": "#cookiefirst-root,.cookiefirst-root" + } + ], + "optIn": [ + { + "click": "button[data-cookiefirst-action=accept]" + } + ], "optOut": [ { "if": { "exists": "button[data-cookiefirst-action=adjust]" }, "then": [ - { + { "click": "button[data-cookiefirst-action=adjust]" }, - { + { "waitForVisible": "[data-cookiefirst-widget=modal]", "timeout": 1000 }, { - "eval": "document.querySelectorAll('button[data-cookiefirst-accent-color=true][role=checkbox]:not([disabled])').forEach(i => (i.getAttribute('aria-checked') == 'true' && i.click())) || true" + "eval": "COOKIEFIRST_1" }, { "wait": 1000 @@ -28,14 +42,15 @@ } ], "else": [ - { "click": "button[data-cookiefirst-action=reject]" } + { + "click": "button[data-cookiefirst-action=reject]" + } ] } ], "test": [ { - "eval": "let o = JSON.parse(decodeURIComponent(document.cookie.split(';').find(c => c.indexOf('cookiefirst') !== -1).trim()).split('=')[1]); (o.performance === false && o.functional === false && o.advertising === false) ? true : false" + "eval": "COOKIEFIRST_0" } ] - } - \ No newline at end of file +} \ No newline at end of file diff --git a/rules/autoconsent/cookieinformation.json b/rules/autoconsent/cookieinformation.json index 9dad5767..d0467e42 100644 --- a/rules/autoconsent/cookieinformation.json +++ b/rules/autoconsent/cookieinformation.json @@ -1,14 +1,37 @@ { - "name": "Cookie Information Banner", - "prehideSelectors": ["#cookie-information-template-wrapper"], - "detectCmp": [{ "exists": "#cookie-information-template-wrapper" }], - "detectPopup": [{ "visible": "#cookie-information-template-wrapper" }], - "optIn": [ { "eval": "CookieInformation.submitAllCategories() || true"} ], - "optOut": [ - { "hide": ["#cookie-information-template-wrapper"], "comment": "some templates don't hide the banner automatically" }, - { "eval": "CookieInformation.declineAllCategories() || true"} - ], - "test": [ - { "eval": "document.cookie.includes('CookieInformationConsent=')" } - ] + "name": "Cookie Information Banner", + "prehideSelectors": [ + "#cookie-information-template-wrapper" + ], + "detectCmp": [ + { + "exists": "#cookie-information-template-wrapper" + } + ], + "detectPopup": [ + { + "visible": "#cookie-information-template-wrapper" + } + ], + "optIn": [ + { + "eval": "COOKIEINFORMATION_1" + } + ], + "optOut": [ + { + "hide": [ + "#cookie-information-template-wrapper" + ], + "comment": "some templates don't hide the banner automatically" + }, + { + "eval": "COOKIEINFORMATION_0" + } + ], + "test": [ + { + "eval": "COOKIEINFORMATION_2" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/dailymotion.json b/rules/autoconsent/dailymotion.json index 65311095..0ae546d2 100644 --- a/rules/autoconsent/dailymotion.json +++ b/rules/autoconsent/dailymotion.json @@ -1,22 +1,34 @@ { - "name": "dailymotion.com", - "runContext": { - "urlPattern": "^https://(www\\.)?dailymotion\\.com/" - }, - "prehideSelectors": ["div[class*=\"Overlay__container\"]:has(div[class*=\"TCF2Popup\"])"], - "detectCmp": [ - { "exists": "div[class*=\"TCF2Popup\"]" } - ], - "detectPopup": [ - { "visible": "[class*=\"TCF2Popup\"] a[href^=\"https://www.dailymotion.com/legal/cookiemanagement\"]" } - ], - "optIn": [ - { "waitForThenClick": "button[class*=\"TCF2Popup__button\"]:not([class*=\"TCF2Popup__personalize\"])" } - ], - "optOut": [ - { "waitForThenClick": "button[class*=\"TCF2ContinueWithoutAcceptingButton\"]" } - ], - "test": [ - { "eval": "!!document.cookie.match('dm-euconsent-v2')" } - ] -} + "name": "dailymotion.com", + "runContext": { + "urlPattern": "^https://(www\\.)?dailymotion\\.com/" + }, + "prehideSelectors": [ + "div[class*=\"Overlay__container\"]:has(div[class*=\"TCF2Popup\"])" + ], + "detectCmp": [ + { + "exists": "div[class*=\"TCF2Popup\"]" + } + ], + "detectPopup": [ + { + "visible": "[class*=\"TCF2Popup\"] a[href^=\"https://www.dailymotion.com/legal/cookiemanagement\"]" + } + ], + "optIn": [ + { + "waitForThenClick": "button[class*=\"TCF2Popup__button\"]:not([class*=\"TCF2Popup__personalize\"])" + } + ], + "optOut": [ + { + "waitForThenClick": "button[class*=\"TCF2ContinueWithoutAcceptingButton\"]" + } + ], + "test": [ + { + "eval": "DAILYMOTION_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/dsgvo.json b/rules/autoconsent/dsgvo.json index b3edf573..c0cf0bbd 100644 --- a/rules/autoconsent/dsgvo.json +++ b/rules/autoconsent/dsgvo.json @@ -1,17 +1,37 @@ { - "name": "WP DSGVO Tools", - "link": "https://wordpress.org/plugins/shapepress-dsgvo/", - "prehideSelectors": [".sp-dsgvo"], - "cosmetic": true, - "detectCmp": [{ "exists": ".sp-dsgvo.sp-dsgvo-popup-overlay" }], - "detectPopup": [{ "visible": ".sp-dsgvo.sp-dsgvo-popup-overlay", "check": "any" }], - "optIn": [ - { "click": ".sp-dsgvo-privacy-btn-accept-all", "all": true } - ], - "optOut": [ - { "hide": [".sp-dsgvo.sp-dsgvo-popup-overlay"] } - ], - "test": [ - { "eval": "!document.cookie.includes('sp_dsgvo_cookie_settings')" } - ] + "name": "WP DSGVO Tools", + "link": "https://wordpress.org/plugins/shapepress-dsgvo/", + "prehideSelectors": [ + ".sp-dsgvo" + ], + "cosmetic": true, + "detectCmp": [ + { + "exists": ".sp-dsgvo.sp-dsgvo-popup-overlay" + } + ], + "detectPopup": [ + { + "visible": ".sp-dsgvo.sp-dsgvo-popup-overlay", + "check": "any" + } + ], + "optIn": [ + { + "click": ".sp-dsgvo-privacy-btn-accept-all", + "all": true + } + ], + "optOut": [ + { + "hide": [ + ".sp-dsgvo.sp-dsgvo-popup-overlay" + ] + } + ], + "test": [ + { + "eval": "DSGVO_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/dunelm.json b/rules/autoconsent/dunelm.json index aca74b80..bd55e5ed 100644 --- a/rules/autoconsent/dunelm.json +++ b/rules/autoconsent/dunelm.json @@ -1,18 +1,34 @@ { - "name": "dunelm.com", - "prehideSelectors": ["div[data-testid=cookie-consent-modal-backdrop]"], - "detectCmp": [{ "exists": "div[data-testid=cookie-consent-message-contents]"}], - "detectPopup": [{ "visible": "div[data-testid=cookie-consent-message-contents]" }], - "optIn": [{ "click": "[data-testid=\"cookie-consent-allow-all\"]" }], - "optOut": [ - { - "click": "button[data-testid=cookie-consent-adjust-settings]" - }, - { - "click": "button[data-testid=cookie-consent-preferences-save]" - } - ], - "test": [ - {"eval": "document.cookie.includes('cc_functional=0') && document.cookie.includes('cc_targeting=0')"} - ] -} + "name": "dunelm.com", + "prehideSelectors": [ + "div[data-testid=cookie-consent-modal-backdrop]" + ], + "detectCmp": [ + { + "exists": "div[data-testid=cookie-consent-message-contents]" + } + ], + "detectPopup": [ + { + "visible": "div[data-testid=cookie-consent-message-contents]" + } + ], + "optIn": [ + { + "click": "[data-testid=\"cookie-consent-allow-all\"]" + } + ], + "optOut": [ + { + "click": "button[data-testid=cookie-consent-adjust-settings]" + }, + { + "click": "button[data-testid=cookie-consent-preferences-save]" + } + ], + "test": [ + { + "eval": "DUNELM_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/etsy.json b/rules/autoconsent/etsy.json index 56ab5327..5c0e7216 100644 --- a/rules/autoconsent/etsy.json +++ b/rules/autoconsent/etsy.json @@ -1,14 +1,40 @@ { "name": "etsy", - "prehideSelectors": ["#gdpr-single-choice-overlay", "#gdpr-privacy-settings"], - "detectCmp": [{ "exists": "#gdpr-single-choice-overlay" }], - "detectPopup": [{ "visible": "#gdpr-single-choice-overlay" }], + "prehideSelectors": [ + "#gdpr-single-choice-overlay", + "#gdpr-privacy-settings" + ], + "detectCmp": [ + { + "exists": "#gdpr-single-choice-overlay" + } + ], + "detectPopup": [ + { + "visible": "#gdpr-single-choice-overlay" + } + ], "optOut": [ - {"click": "button[data-gdpr-open-full-settings]"}, - {"waitForVisible": ".gdpr-overlay-body input", "timeout": 3000}, - {"wait": 1000}, - {"eval": "document.querySelectorAll(\".gdpr-overlay-body input\").forEach(toggle => { toggle.checked = false; }) || true"}, - {"eval": "document.querySelector('.gdpr-overlay-view button[data-wt-overlay-close]').click() || true"} - ], - "optIn": [{"click": "button[data-gdpr-single-choice-accept]"}] -} + { + "click": "button[data-gdpr-open-full-settings]" + }, + { + "waitForVisible": ".gdpr-overlay-body input", + "timeout": 3000 + }, + { + "wait": 1000 + }, + { + "eval": "ETSY_0" + }, + { + "eval": "ETSY_1" + } + ], + "optIn": [ + { + "click": "button[data-gdpr-single-choice-accept]" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/eu-cookie-compliance.json b/rules/autoconsent/eu-cookie-compliance.json index 8cc032be..49ca1b73 100644 --- a/rules/autoconsent/eu-cookie-compliance.json +++ b/rules/autoconsent/eu-cookie-compliance.json @@ -1,13 +1,35 @@ { - "name": "eu-cookie-compliance-banner", - "detectCmp": [{ "exists": ".eu-cookie-compliance-banner-info" }], - "detectPopup": [{ "exists": ".eu-cookie-compliance-popup-open" }], - "optIn": [{ "click": ".agree-button" }], - "optOut": [ - { "click": ".decline-button,.eu-cookie-compliance-save-preferences-button", "optional": true }, - { "hide": [".eu-cookie-compliance-banner-info", "#sliding-popup"] } - ], - "test": [ - { "eval": "document.cookie.indexOf('cookie-agreed=2') === -1" } - ] -} + "name": "eu-cookie-compliance-banner", + "detectCmp": [ + { + "exists": ".eu-cookie-compliance-banner-info" + } + ], + "detectPopup": [ + { + "exists": ".eu-cookie-compliance-popup-open" + } + ], + "optIn": [ + { + "click": ".agree-button" + } + ], + "optOut": [ + { + "click": ".decline-button,.eu-cookie-compliance-save-preferences-button", + "optional": true + }, + { + "hide": [ + ".eu-cookie-compliance-banner-info", + "#sliding-popup" + ] + } + ], + "test": [ + { + "eval": "EU_COOKIE_COMPLIANCE_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/eu-cookie-law.json b/rules/autoconsent/eu-cookie-law.json index 71320d1e..fdab7cf2 100644 --- a/rules/autoconsent/eu-cookie-law.json +++ b/rules/autoconsent/eu-cookie-law.json @@ -1,21 +1,37 @@ { - "name": "EU Cookie Law", - "prehideSelectors": [".pea_cook_wrapper,.pea_cook_more_info_popover"], - "cosmetic": true, - "detectCmp": [{ "exists": ".pea_cook_wrapper" }], - "detectPopup": [ - { "wait": 500 }, - { "visible": ".pea_cook_wrapper" } - ], - "optIn": [ - { - "click": "#pea_cook_btn" - } - ], - "optOut": [ - { "hide": [".pea_cook_wrapper"] } - ], - "test": [ - { "eval": "!document.cookie.includes('euCookie')" } - ] + "name": "EU Cookie Law", + "prehideSelectors": [ + ".pea_cook_wrapper,.pea_cook_more_info_popover" + ], + "cosmetic": true, + "detectCmp": [ + { + "exists": ".pea_cook_wrapper" + } + ], + "detectPopup": [ + { + "wait": 500 + }, + { + "visible": ".pea_cook_wrapper" + } + ], + "optIn": [ + { + "click": "#pea_cook_btn" + } + ], + "optOut": [ + { + "hide": [ + ".pea_cook_wrapper" + ] + } + ], + "test": [ + { + "eval": "EU_COOKIE_LAW_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/ezoic.json b/rules/autoconsent/ezoic.json index 36d98bf2..1f731ef5 100644 --- a/rules/autoconsent/ezoic.json +++ b/rules/autoconsent/ezoic.json @@ -1,20 +1,49 @@ { - "name": "EZoic", - "prehideSelectors": ["#ez-cookie-dialog-wrapper"], - "detectCmp": [{ "exists": "#ez-cookie-dialog-wrapper" }], - "detectPopup": [{ "visible": "#ez-cookie-dialog-wrapper" }], - "optIn": [ - { "click": "#ez-accept-all", "optional": true }, - { "eval": "ezCMP.handleAcceptAllClick()", "optional": true } - ], - "optOut": [ - { "wait": 500 }, - { "click": "#ez-manage-settings" }, - { "waitFor": "#ez-cookie-dialog input[type=checkbox]" }, - { "click": "#ez-cookie-dialog input[type=checkbox][checked]", "all": true }, - { "click": "#ez-save-settings" } - ], - "test": [ - { "eval": "!!document.cookie.match(/ezCMPCookieConsent=[^;]+\\|2=0\\|3=0\\|4=0/)" } - ] + "name": "EZoic", + "prehideSelectors": [ + "#ez-cookie-dialog-wrapper" + ], + "detectCmp": [ + { + "exists": "#ez-cookie-dialog-wrapper" + } + ], + "detectPopup": [ + { + "visible": "#ez-cookie-dialog-wrapper" + } + ], + "optIn": [ + { + "click": "#ez-accept-all", + "optional": true + }, + { + "eval": "EZOIC_0", + "optional": true + } + ], + "optOut": [ + { + "wait": 500 + }, + { + "click": "#ez-manage-settings" + }, + { + "waitFor": "#ez-cookie-dialog input[type=checkbox]" + }, + { + "click": "#ez-cookie-dialog input[type=checkbox][checked]", + "all": true + }, + { + "click": "#ez-save-settings" + } + ], + "test": [ + { + "eval": "EZOIC_1" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/google.json b/rules/autoconsent/google.json index 8d0fbc5b..47155194 100644 --- a/rules/autoconsent/google.json +++ b/rules/autoconsent/google.json @@ -1,22 +1,34 @@ { - "name": "google.com", - "prehideSelectors": [".HTjtHe#xe7COe"], - "detectCmp": [ - { "exists": ".HTjtHe#xe7COe" }, - { "exists": ".HTjtHe#xe7COe a[href^=\"https://policies.google.com/technologies/cookies\"]" } - ], - "detectPopup": [ - { "visible": ".HTjtHe#xe7COe button#W0wltc" } - ], - "optIn": [ - { "waitForThenClick": ".HTjtHe#xe7COe button#L2AGLb" } - ], - "optOut": [ - { - "waitForThenClick": ".HTjtHe#xe7COe button#W0wltc" - } - ], - "test": [ - { "eval": "!!document.cookie.match(/SOCS=CAE/)" } - ] -} + "name": "google.com", + "prehideSelectors": [ + ".HTjtHe#xe7COe" + ], + "detectCmp": [ + { + "exists": ".HTjtHe#xe7COe" + }, + { + "exists": ".HTjtHe#xe7COe a[href^=\"https://policies.google.com/technologies/cookies\"]" + } + ], + "detectPopup": [ + { + "visible": ".HTjtHe#xe7COe button#W0wltc" + } + ], + "optIn": [ + { + "waitForThenClick": ".HTjtHe#xe7COe button#L2AGLb" + } + ], + "optOut": [ + { + "waitForThenClick": ".HTjtHe#xe7COe button#W0wltc" + } + ], + "test": [ + { + "eval": "GOOGLE_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/iubenda.json b/rules/autoconsent/iubenda.json index 94987816..6fecd24f 100644 --- a/rules/autoconsent/iubenda.json +++ b/rules/autoconsent/iubenda.json @@ -1,23 +1,37 @@ { - "name": "iubenda", - "prehideSelectors": ["#iubenda-cs-banner"], - "detectCmp": [{ "exists": "#iubenda-cs-banner" }], - "detectPopup": [{ "visible": ".iubenda-cs-accept-btn" }], - "optIn": [ - { "click": ".iubenda-cs-accept-btn" } - ], - "optOut": [ - { - "click": ".iubenda-cs-customize-btn" - }, - { - "eval": "document.querySelectorAll('.purposes-item input[type=checkbox]:not([disabled])').forEach(x => {if(x.checked) x.click()}) || true" - }, - { - "click": "#iubFooterBtn" - } - ], - "test": [ - { "eval": "!!document.cookie.match(/_iub_cs-\\d+=/)" } - ] -} + "name": "iubenda", + "prehideSelectors": [ + "#iubenda-cs-banner" + ], + "detectCmp": [ + { + "exists": "#iubenda-cs-banner" + } + ], + "detectPopup": [ + { + "visible": ".iubenda-cs-accept-btn" + } + ], + "optIn": [ + { + "click": ".iubenda-cs-accept-btn" + } + ], + "optOut": [ + { + "click": ".iubenda-cs-customize-btn" + }, + { + "eval": "IUBENDA_0" + }, + { + "click": "#iubFooterBtn" + } + ], + "test": [ + { + "eval": "IUBENDA_1" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/jquery-cookiebar.json b/rules/autoconsent/jquery-cookiebar.json index 6762e518..9ef7c2d9 100644 --- a/rules/autoconsent/jquery-cookiebar.json +++ b/rules/autoconsent/jquery-cookiebar.json @@ -1,26 +1,40 @@ { - "name": "jquery.cookieBar", - "comment": "https://github.com/kovarp/jquery.cookieBar", - "prehideSelectors": [".cookie-bar"], - "cosmetic": true, - "detectCmp": [{ "exists": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons" }], - "detectPopup": [{ - "visible": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons", - "check": "any" - }], - "optIn": [ - { "click": ".cookie-bar .cookie-bar__btn" } - ], - "optOut": [ - { "hide": [".cookie-bar"] } - ], - "test": [ - { - "visible": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons", - "check": "none" - }, - { - "eval": "!document.cookie.includes('cookies-state=accepted')" - } - ] + "name": "jquery.cookieBar", + "comment": "https://github.com/kovarp/jquery.cookieBar", + "prehideSelectors": [ + ".cookie-bar" + ], + "cosmetic": true, + "detectCmp": [ + { + "exists": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons" + } + ], + "detectPopup": [ + { + "visible": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons", + "check": "any" + } + ], + "optIn": [ + { + "click": ".cookie-bar .cookie-bar__btn" + } + ], + "optOut": [ + { + "hide": [ + ".cookie-bar" + ] + } + ], + "test": [ + { + "visible": ".cookie-bar .cookie-bar__message,.cookie-bar .cookie-bar__buttons", + "check": "none" + }, + { + "eval": "JQUERY_COOKIEBAR_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/mediavine.json b/rules/autoconsent/mediavine.json index 05d41264..9330d1e0 100644 --- a/rules/autoconsent/mediavine.json +++ b/rules/autoconsent/mediavine.json @@ -1,20 +1,39 @@ { - "name": "Mediavine", - "prehideSelectors": ["[data-name=\"mediavine-gdpr-cmp\"]"], - "detectCmp": [{ "exists": "[data-name=\"mediavine-gdpr-cmp\"]" }], - "detectPopup": [ - { "wait": 500 }, - { "visible": "[data-name=\"mediavine-gdpr-cmp\"]" } - ], - "optIn": [ - { - "waitForThenClick": "[data-name=\"mediavine-gdpr-cmp\"] [format=\"primary\"]" - } - ], - "optOut": [ - { "waitForThenClick": "[data-name=\"mediavine-gdpr-cmp\"] [data-view=\"manageSettings\"]" }, - { "waitFor": "[data-name=\"mediavine-gdpr-cmp\"] input[type=checkbox]" }, - { "eval": "document.querySelectorAll(\"[data-name=\\\"mediavine-gdpr-cmp\\\"] input[type=checkbox]\").forEach(x => x.checked && x.click()) || true", "optional": true }, - { "click": "[data-name=\"mediavine-gdpr-cmp\"] [format=\"secondary\"]" } - ] + "name": "Mediavine", + "prehideSelectors": [ + "[data-name=\"mediavine-gdpr-cmp\"]" + ], + "detectCmp": [ + { + "exists": "[data-name=\"mediavine-gdpr-cmp\"]" + } + ], + "detectPopup": [ + { + "wait": 500 + }, + { + "visible": "[data-name=\"mediavine-gdpr-cmp\"]" + } + ], + "optIn": [ + { + "waitForThenClick": "[data-name=\"mediavine-gdpr-cmp\"] [format=\"primary\"]" + } + ], + "optOut": [ + { + "waitForThenClick": "[data-name=\"mediavine-gdpr-cmp\"] [data-view=\"manageSettings\"]" + }, + { + "waitFor": "[data-name=\"mediavine-gdpr-cmp\"] input[type=checkbox]" + }, + { + "eval": "MEDIAVINE_0", + "optional": true + }, + { + "click": "[data-name=\"mediavine-gdpr-cmp\"] [format=\"secondary\"]" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/microsoft.json b/rules/autoconsent/microsoft.json index 4e3a9364..fbde986d 100644 --- a/rules/autoconsent/microsoft.json +++ b/rules/autoconsent/microsoft.json @@ -1,9 +1,31 @@ { "name": "microsoft.com", - "prehideSelectors": ["#wcpConsentBannerCtrl"], - "detectCmp": [{ "exists": "#wcpConsentBannerCtrl" }], - "detectPopup": [{ "exists": "#wcpConsentBannerCtrl" }], - "optOut": [{ "eval": "Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Reject|Ablehnen'))[0].click() || true" }], - "optIn": [{ "eval": "Array.from(document.querySelectorAll('div > button')).filter(el => el.innerText.match('Accept|Annehmen'))[0].click() || true" }], - "test": [{ "eval": "!!document.cookie.match('MSCC')"}] - } + "prehideSelectors": [ + "#wcpConsentBannerCtrl" + ], + "detectCmp": [ + { + "exists": "#wcpConsentBannerCtrl" + } + ], + "detectPopup": [ + { + "exists": "#wcpConsentBannerCtrl" + } + ], + "optOut": [ + { + "eval": "MICROSOFT_0" + } + ], + "optIn": [ + { + "eval": "MICROSOFT_1" + } + ], + "test": [ + { + "eval": "MICROSOFT_2" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/paypal.json b/rules/autoconsent/paypal.json index b2dfed0d..45f7ca71 100644 --- a/rules/autoconsent/paypal.json +++ b/rules/autoconsent/paypal.json @@ -1,19 +1,37 @@ { - "name": "paypal.com", - "prehideSelectors": ["#gdprCookieBanner"], - "detectCmp": [{ "exists": "#gdprCookieBanner"}], - "detectPopup": [{ "visible": "#gdprCookieContent_wrapper" }], - "optIn": [{ "click": "#acceptAllButton" }], - "optOut": [ - { - "wait": 200 - }, - { - "click": ".gdprCookieBanner_decline-button" - } - ], - "test": [ - { "wait": 500 }, - { "eval": "document.cookie.includes('cookie_prefs') === true" } - ] -} + "name": "paypal.com", + "prehideSelectors": [ + "#gdprCookieBanner" + ], + "detectCmp": [ + { + "exists": "#gdprCookieBanner" + } + ], + "detectPopup": [ + { + "visible": "#gdprCookieContent_wrapper" + } + ], + "optIn": [ + { + "click": "#acceptAllButton" + } + ], + "optOut": [ + { + "wait": 200 + }, + { + "click": ".gdprCookieBanner_decline-button" + } + ], + "test": [ + { + "wait": 500 + }, + { + "eval": "PAYPAL_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/primebox.json b/rules/autoconsent/primebox.json index fcf688e9..bca69727 100644 --- a/rules/autoconsent/primebox.json +++ b/rules/autoconsent/primebox.json @@ -1,19 +1,38 @@ { - "name": "PrimeBox CookieBar", - "prehideSelectors": ["#cookie-bar"], - "detectCmp": [{ "exists": "#cookie-bar .cb-enable,#cookie-bar .cb-disable,#cookie-bar .cb-policy" }], - "detectPopup": [{ - "visible": "#cookie-bar .cb-enable,#cookie-bar .cb-disable,#cookie-bar .cb-policy", - "check": "any" - }], - "optIn": [ - { "waitForThenClick": "#cookie-bar .cb-enable" } - ], - "optOut": [ - { "click": "#cookie-bar .cb-disable", "optional": true }, - { "hide": ["#cookie-bar"] } - ], - "test": [ - { "eval": "!document.cookie.includes('cb-enabled=accepted')" } - ] + "name": "PrimeBox CookieBar", + "prehideSelectors": [ + "#cookie-bar" + ], + "detectCmp": [ + { + "exists": "#cookie-bar .cb-enable,#cookie-bar .cb-disable,#cookie-bar .cb-policy" + } + ], + "detectPopup": [ + { + "visible": "#cookie-bar .cb-enable,#cookie-bar .cb-disable,#cookie-bar .cb-policy", + "check": "any" + } + ], + "optIn": [ + { + "waitForThenClick": "#cookie-bar .cb-enable" + } + ], + "optOut": [ + { + "click": "#cookie-bar .cb-disable", + "optional": true + }, + { + "hide": [ + "#cookie-bar" + ] + } + ], + "test": [ + { + "eval": "PRIMEBOX_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/pubtech.json b/rules/autoconsent/pubtech.json index a8fba5c0..2e83a247 100644 --- a/rules/autoconsent/pubtech.json +++ b/rules/autoconsent/pubtech.json @@ -1,42 +1,43 @@ { - "name": "pubtech", - "prehideSelectors": ["#pubtech-cmp"], - "detectCmp": [ - { - "exists": "#pubtech-cmp" - } - ], - "detectPopup": [ - { - "visible": "#pubtech-cmp #pt-actions" - } - ], - "optIn": [ - { - "if": { - "exists": "#pt-accept-all" - }, - "then": [ + "name": "pubtech", + "prehideSelectors": [ + "#pubtech-cmp" + ], + "detectCmp": [ { - "click": "#pubtech-cmp #pt-actions #pt-accept-all" - } - ], - "else": [ + "exists": "#pubtech-cmp" + } + ], + "detectPopup": [ + { + "visible": "#pubtech-cmp #pt-actions" + } + ], + "optIn": [ + { + "if": { + "exists": "#pt-accept-all" + }, + "then": [ + { + "click": "#pubtech-cmp #pt-actions #pt-accept-all" + } + ], + "else": [ + { + "click": "#pubtech-cmp #pt-actions button:nth-of-type(2)" + } + ] + } + ], + "optOut": [ + { + "click": "#pubtech-cmp #pt-close" + } + ], + "test": [ { - "click": "#pubtech-cmp #pt-actions button:nth-of-type(2)" + "eval": "PUBTECH_0" } - ] - } - ], - "optOut": [ - - { - "click": "#pubtech-cmp #pt-close" - } - ], - "test": [ - { - "eval": "document.cookie.includes('euconsent-v2') && (document.cookie.match(/.YAAAAAAAAAAA/) || document.cookie.match(/.aAAAAAAAAAAA/) || document.cookie.match(/.YAAACFgAAAAA/)) " - } - ] -} + ] +} \ No newline at end of file diff --git a/rules/autoconsent/reddit.json b/rules/autoconsent/reddit.json index 12f635ab..46cc3bf4 100644 --- a/rules/autoconsent/reddit.json +++ b/rules/autoconsent/reddit.json @@ -1,22 +1,34 @@ { - "name": "reddit.com", - "runContext": { - "urlPattern": "^https://www\\.reddit\\.com/" - }, - "prehideSelectors": ["section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])"], - "detectCmp": [ - { "exists": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])" } - ], - "detectPopup": [ - { "visible": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])" } - ], - "optIn": [ - { "waitForThenClick": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"]) section[class^='_'] > section:first-child form button" } - ], - "optOut": [ - { "waitForThenClick": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"]) section[class^='_'] > section:last-child form button" } - ], - "test": [ - {"eval": "document.cookie.includes('eu_cookie={%22opted%22:true%2C%22nonessential%22:false}')"} - ] -} + "name": "reddit.com", + "runContext": { + "urlPattern": "^https://www\\.reddit\\.com/" + }, + "prehideSelectors": [ + "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])" + ], + "detectCmp": [ + { + "exists": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])" + } + ], + "detectPopup": [ + { + "visible": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"])" + } + ], + "optIn": [ + { + "waitForThenClick": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"]) section[class^='_'] > section:first-child form button" + } + ], + "optOut": [ + { + "waitForThenClick": "section:has(a[href^=\"https://www.reddit.com/policies/cookies\"]) section[class^='_'] > section:last-child form button" + } + ], + "test": [ + { + "eval": "REDDIT_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/sibbo.json b/rules/autoconsent/sibbo.json index bd37196e..2cc5b8f2 100644 --- a/rules/autoconsent/sibbo.json +++ b/rules/autoconsent/sibbo.json @@ -1,43 +1,57 @@ { - "name": "sibbo", - "prehideSelectors": ["sibbo-cmp-layout"], - "detectCmp": [{ "exists": "sibbo-cmp-layout" }], - "detectPopup": [{ "visible": "sibbo-cmp-layout" }], - "optIn": [{ "click": "sibbo-cmp-layout [data-accept-all]" }], - "optOut": [ - { - "click": ".sibbo-panel__aside__buttons a[data-nav=\"purposes\"]" - }, - { - "click": ".sibbo-panel__main__header__actions a[data-focusable=\"reject-all\"]" - }, - { - "if": { - "exists": "[data-view=purposes] .sibbo-panel__main__footer__actions [data-save-and-exit]" - }, - "then": [], - "else": [ - { - "waitFor": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]:not(.sibbo-cmp-button--disabled)" + "name": "sibbo", + "prehideSelectors": [ + "sibbo-cmp-layout" + ], + "detectCmp": [ + { + "exists": "sibbo-cmp-layout" + } + ], + "detectPopup": [ + { + "visible": "sibbo-cmp-layout" + } + ], + "optIn": [ + { + "click": "sibbo-cmp-layout [data-accept-all]" + } + ], + "optOut": [ + { + "click": ".sibbo-panel__aside__buttons a[data-nav=\"purposes\"]" }, - { - "click": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]" + { + "click": ".sibbo-panel__main__header__actions a[data-focusable=\"reject-all\"]" }, - { - "click": ".sibbo-panel__main div[data-view=\"purposesLegInt\"] a[data-focusable=\"reject-all\"]" + { + "if": { + "exists": "[data-view=purposes] .sibbo-panel__main__footer__actions [data-save-and-exit]" + }, + "then": [], + "else": [ + { + "waitFor": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]:not(.sibbo-cmp-button--disabled)" + }, + { + "click": ".sibbo-panel__main__footer__actions a[data-focusable=\"next\"]" + }, + { + "click": ".sibbo-panel__main div[data-view=\"purposesLegInt\"] a[data-focusable=\"reject-all\"]" + } + ] + }, + { + "waitFor": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)" + }, + { + "click": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)" + } + ], + "test": [ + { + "eval": "SIBBO_0" } - ] - }, - { - "waitFor": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)" - }, - { - "click": ".sibbo-panel__main__footer__actions [data-save-and-exit]:not(.sibbo-cmp-button--disabled)" - } - ], - "test": [ - { - "eval": "!!window.localStorage.getItem('euconsent-v2')" - } - ] -} + ] +} \ No newline at end of file diff --git a/rules/autoconsent/sirdata.json b/rules/autoconsent/sirdata.json index a1851258..3849e064 100644 --- a/rules/autoconsent/sirdata.json +++ b/rules/autoconsent/sirdata.json @@ -1,11 +1,31 @@ { - "name": "Sirdata", - "prehideSelectors": ["#sd-cmp"], - "detectCmp": [{ "exists": "#sd-cmp" }], - "detectPopup": [{ "visible": "#sd-cmp" }], - "optIn": [ { "waitForThenClick": "#sd-cmp .sd-cmp-3cRQ2" } ], - "optOut": [ { "waitForThenClick": "#sd-cmp .sd-cmp-1pO44" } ], - "test": [ - { "eval": "document.cookie.includes('euconsent-v2')" } - ] + "name": "Sirdata", + "prehideSelectors": [ + "#sd-cmp" + ], + "detectCmp": [ + { + "exists": "#sd-cmp" + } + ], + "detectPopup": [ + { + "visible": "#sd-cmp" + } + ], + "optIn": [ + { + "waitForThenClick": "#sd-cmp .sd-cmp-3cRQ2" + } + ], + "optOut": [ + { + "waitForThenClick": "#sd-cmp .sd-cmp-1pO44" + } + ], + "test": [ + { + "eval": "SIRDATA_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/snigel.json b/rules/autoconsent/snigel.json index 8bb5a350..b83484f2 100644 --- a/rules/autoconsent/snigel.json +++ b/rules/autoconsent/snigel.json @@ -1,8 +1,31 @@ { "name": "snigel", - "detectCmp": [{ "exists": ".snigel-cmp-framework" }], - "detectPopup": [{ "visible": ".snigel-cmp-framework" }], - "optOut": [{ "click": "#sn-b-custom" }, {"click": "#sn-b-save"}], - "test": [{ "eval": "!!document.cookie.match('snconsent')"}], - "optIn": [{ "click": ".snigel-cmp-framework #accept-choices" }] - } + "detectCmp": [ + { + "exists": ".snigel-cmp-framework" + } + ], + "detectPopup": [ + { + "visible": ".snigel-cmp-framework" + } + ], + "optOut": [ + { + "click": "#sn-b-custom" + }, + { + "click": "#sn-b-save" + } + ], + "test": [ + { + "eval": "SNIGEL_0" + } + ], + "optIn": [ + { + "click": ".snigel-cmp-framework #accept-choices" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/steampowered.json b/rules/autoconsent/steampowered.json index e66c424f..bbf9bd27 100644 --- a/rules/autoconsent/steampowered.json +++ b/rules/autoconsent/steampowered.json @@ -1,15 +1,34 @@ { - "name": "steampowered.com", - "detectCmp": [{ "exists": ".cookiepreferences_popup" }, { "visible": ".cookiepreferences_popup" }], - "detectPopup": [{ "visible": ".cookiepreferences_popup" }], - "optOut": [{ "click": "#rejectAllButton" }], - "optIn": [{ "click": "#acceptAllButton" }], - "test": [ - { - "wait": 1000 - }, - { - "eval": "JSON.parse(decodeURIComponent(document.cookie.split(';').find(s => s.trim().startsWith('cookieSettings')).split('=')[1])).preference_state === 2" - } - ] -} + "name": "steampowered.com", + "detectCmp": [ + { + "exists": ".cookiepreferences_popup" + }, + { + "visible": ".cookiepreferences_popup" + } + ], + "detectPopup": [ + { + "visible": ".cookiepreferences_popup" + } + ], + "optOut": [ + { + "click": "#rejectAllButton" + } + ], + "optIn": [ + { + "click": "#acceptAllButton" + } + ], + "test": [ + { + "wait": 1000 + }, + { + "eval": "STEAMPOWERED_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/tarteaucitron.json b/rules/autoconsent/tarteaucitron.json index 13f2f75e..bb30379a 100644 --- a/rules/autoconsent/tarteaucitron.json +++ b/rules/autoconsent/tarteaucitron.json @@ -1,18 +1,33 @@ { - "name": "tarteaucitron.js", - "prehideSelectors": ["#tarteaucitronRoot"], - "detectCmp": [{ "exists": "#tarteaucitronRoot" }], - "detectPopup": [{ - "visible": "#tarteaucitronRoot #tarteaucitronAlertSmall,#tarteaucitronRoot #tarteaucitronAlertBig", - "check": "any" - }], - "optIn": [ - { "eval": "tarteaucitron.userInterface.respondAll(true) || true" } - ], - "optOut": [ - { "eval": "tarteaucitron.userInterface.respondAll(false) || true" } - ], - "test": [ - { "eval": "document.cookie.match(/tarteaucitron=[^;]*/)[0].includes('false')", "comment": "sometimes there are required categories, so we check that at least something is false" } - ] -} + "name": "tarteaucitron.js", + "prehideSelectors": [ + "#tarteaucitronRoot" + ], + "detectCmp": [ + { + "exists": "#tarteaucitronRoot" + } + ], + "detectPopup": [ + { + "visible": "#tarteaucitronRoot #tarteaucitronAlertSmall,#tarteaucitronRoot #tarteaucitronAlertBig", + "check": "any" + } + ], + "optIn": [ + { + "eval": "TARTEAUCITRON_1" + } + ], + "optOut": [ + { + "eval": "TARTEAUCITRON_0" + } + ], + "test": [ + { + "eval": "TARTEAUCITRON_2", + "comment": "sometimes there are required categories, so we check that at least something is false" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/tealium.json b/rules/autoconsent/tealium.json index 23bd6eda..6709bb80 100644 --- a/rules/autoconsent/tealium.json +++ b/rules/autoconsent/tealium.json @@ -1,17 +1,43 @@ { "name": "Tealium", - "prehideSelectors": ["#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#consent-layer"], - "detectCmp": [{ "visible": "#__tealiumGDPRecModal" }, { "eval": "typeof window.utag !== 'undefined' && typeof utag.gdpr === 'object'" }], - "detectPopup": [{ "visible": "#__tealiumGDPRecModal" }], + "prehideSelectors": [ + "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#consent-layer" + ], + "detectCmp": [ + { + "visible": "#__tealiumGDPRecModal" + }, + { + "eval": "TEALIUM_0" + } + ], + "detectPopup": [ + { + "visible": "#__tealiumGDPRecModal" + } + ], "optOut": [ - { "waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies", "timeout": 1000 }, - { "eval": "utag.gdpr.setConsentValue(false) || true" } + { + "waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies", + "timeout": 1000 + }, + { + "eval": "TEALIUM_1" + } ], "optIn": [ - { "hide": ["#__tealiumGDPRecModal"] }, - { "eval": "utag.gdpr.setConsentValue(true) || true" } + { + "hide": [ + "#__tealiumGDPRecModal" + ] + }, + { + "eval": "TEALIUM_2" + } ], "test": [ - { "eval": "utag.gdpr.getConsentState() !== 1" } + { + "eval": "TEALIUM_3" + } ] - } +} \ No newline at end of file diff --git a/rules/autoconsent/testcmp-cosmetic.json b/rules/autoconsent/testcmp-cosmetic.json index d2b19d18..6e371235 100644 --- a/rules/autoconsent/testcmp-cosmetic.json +++ b/rules/autoconsent/testcmp-cosmetic.json @@ -1,18 +1,40 @@ { "name": "Test page cosmetic CMP", "cosmetic": true, - "prehideSelectors": ["#privacy-test-page-cmp-test-prehide"], - "detectCmp": [{ "exists": "#privacy-test-page-cmp-test-banner" }], - "detectPopup": [{ "visible": "#privacy-test-page-cmp-test-banner" }], + "prehideSelectors": [ + "#privacy-test-page-cmp-test-prehide" + ], + "detectCmp": [ + { + "exists": "#privacy-test-page-cmp-test-banner" + } + ], + "detectPopup": [ + { + "visible": "#privacy-test-page-cmp-test-banner" + } + ], "optIn": [ - { "waitFor": "#accept-all" }, - { "click": "#accept-all" } + { + "waitFor": "#accept-all" + }, + { + "click": "#accept-all" + } ], "optOut": [ - { "hide": ["#privacy-test-page-cmp-test-banner"] } + { + "hide": [ + "#privacy-test-page-cmp-test-banner" + ] + } ], "test": [ - { "wait": 500 }, - { "eval": "window.results.results[0] === 'banner_hidden'" } + { + "wait": 500 + }, + { + "eval": "TESTCMP_COSMETIC_0" + } ] - } \ No newline at end of file +} \ No newline at end of file diff --git a/rules/autoconsent/testcmp.json b/rules/autoconsent/testcmp.json index 99e106c3..f9034f16 100644 --- a/rules/autoconsent/testcmp.json +++ b/rules/autoconsent/testcmp.json @@ -1,15 +1,37 @@ { "name": "Test page CMP", - "prehideSelectors": ["#reject-all"], - "detectCmp": [{ "exists": "#privacy-test-page-cmp-test" }], - "detectPopup": [{ "visible": "#privacy-test-page-cmp-test" }], + "prehideSelectors": [ + "#reject-all" + ], + "detectCmp": [ + { + "exists": "#privacy-test-page-cmp-test" + } + ], + "detectPopup": [ + { + "visible": "#privacy-test-page-cmp-test" + } + ], "optIn": [ - { "waitFor": "#accept-all" }, - { "click": "#accept-all" } + { + "waitFor": "#accept-all" + }, + { + "click": "#accept-all" + } ], "optOut": [ - { "waitFor": "#reject-all" }, - { "click": "#reject-all" } + { + "waitFor": "#reject-all" + }, + { + "click": "#reject-all" + } ], - "test": [{ "eval": "window.results.results[0] === 'button_clicked'" }] - } \ No newline at end of file + "test": [ + { + "eval": "TESTCMP_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/thefreedictionary.json b/rules/autoconsent/thefreedictionary.json index d736ae44..a68d727d 100644 --- a/rules/autoconsent/thefreedictionary.json +++ b/rules/autoconsent/thefreedictionary.json @@ -1,12 +1,26 @@ { - "name": "thefreedictionary.com", - "prehideSelectors": ["#cmpBanner"], - "detectCmp": [{ "exists": "#cmpBanner" }], - "detectPopup": [{ "visible": "#cmpBanner" }], - "optIn": [{ "eval": "cmpUi.allowAll() || true" }], - "optOut": [ - { - "eval": "cmpUi.showPurposes() || cmpUi.rejectAll() || true" - } - ] -} + "name": "thefreedictionary.com", + "prehideSelectors": [ + "#cmpBanner" + ], + "detectCmp": [ + { + "exists": "#cmpBanner" + } + ], + "detectPopup": [ + { + "visible": "#cmpBanner" + } + ], + "optIn": [ + { + "eval": "THEFREEDICTIONARY_1" + } + ], + "optOut": [ + { + "eval": "THEFREEDICTIONARY_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/theverge.json b/rules/autoconsent/theverge.json index bf38027f..ca7a64bd 100644 --- a/rules/autoconsent/theverge.json +++ b/rules/autoconsent/theverge.json @@ -32,7 +32,7 @@ ], "test": [ { - "eval": "document.cookie.includes('_duet_gdpr_acknowledged=1')" + "eval": "THEVERGE_0" } ] } \ No newline at end of file diff --git a/rules/autoconsent/ubuntu.com.json b/rules/autoconsent/ubuntu.com.json index 1d73f8e2..2dc6ef33 100644 --- a/rules/autoconsent/ubuntu.com.json +++ b/rules/autoconsent/ubuntu.com.json @@ -32,7 +32,8 @@ "any": [ { "waitForThenClick": "#cookie-policy-button-accept" - }, { + }, + { "waitForThenClick": "xpath///*[@id=\"cookie-policy-button-accept\"]" } ] @@ -67,7 +68,7 @@ ], "test": [ { - "eval": "document.cookie === '_cookies_accepted=essential'" + "eval": "UBUNTU_COM_0" } ] } \ No newline at end of file diff --git a/rules/autoconsent/uk-cookie-consent.json b/rules/autoconsent/uk-cookie-consent.json index 0b0c7efd..aada165a 100644 --- a/rules/autoconsent/uk-cookie-consent.json +++ b/rules/autoconsent/uk-cookie-consent.json @@ -1,16 +1,34 @@ { - "name": "UK Cookie Consent", - "prehideSelectors": ["#catapult-cookie-bar"], - "cosmetic": true, - "detectCmp": [{ "exists": "#catapult-cookie-bar" }], - "detectPopup": [{ "exists": ".has-cookie-bar #catapult-cookie-bar" }], - "optIn": [ - { "click": "#catapultCookie" } - ], - "optOut": [ - { "hide": ["#catapult-cookie-bar"] } - ], - "test": [ - { "eval": "!document.cookie.includes('catAccCookies')" } - ] + "name": "UK Cookie Consent", + "prehideSelectors": [ + "#catapult-cookie-bar" + ], + "cosmetic": true, + "detectCmp": [ + { + "exists": "#catapult-cookie-bar" + } + ], + "detectPopup": [ + { + "exists": ".has-cookie-bar #catapult-cookie-bar" + } + ], + "optIn": [ + { + "click": "#catapultCookie" + } + ], + "optOut": [ + { + "hide": [ + "#catapult-cookie-bar" + ] + } + ], + "test": [ + { + "eval": "UK_COOKIE_CONSENT_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/usercentrics-api.json b/rules/autoconsent/usercentrics-api.json index 92a3eff6..ccb5f984 100644 --- a/rules/autoconsent/usercentrics-api.json +++ b/rules/autoconsent/usercentrics-api.json @@ -1,25 +1,43 @@ { - "name": "usercentrics-api", - "detectCmp": [{ "exists": "#usercentrics-root" }], - "detectPopup": [ - { - "eval": "typeof UC_UI === 'object'" - }, - { - "exists": [ - "#usercentrics-root", - "[data-testid=uc-container]" - ] - } - ], - "optIn": [ - { "eval": "!!UC_UI.acceptAllConsents()" }, - { "eval": "!!UC_UI.closeCMP()" }, - { "eval": "UC_UI.areAllConsentsAccepted() === true" } - ], - "optOut": [ - { "eval": "!!UC_UI.closeCMP()" }, - { "eval": "!!UC_UI.denyAllConsents()" } - ], - "test": [{ "eval": "UC_UI.areAllConsentsAccepted() === false" }] -} + "name": "usercentrics-api", + "detectCmp": [ + { + "exists": "#usercentrics-root" + } + ], + "detectPopup": [ + { + "eval": "USERCENTRICS_API_0" + }, + { + "exists": [ + "#usercentrics-root", + "[data-testid=uc-container]" + ] + } + ], + "optIn": [ + { + "eval": "USERCENTRICS_API_3" + }, + { + "eval": "USERCENTRICS_API_4" + }, + { + "eval": "USERCENTRICS_API_5" + } + ], + "optOut": [ + { + "eval": "USERCENTRICS_API_1" + }, + { + "eval": "USERCENTRICS_API_2" + } + ], + "test": [ + { + "eval": "USERCENTRICS_API_6" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/usercentrics-button.json b/rules/autoconsent/usercentrics-button.json index 579e9a55..cf17aa06 100644 --- a/rules/autoconsent/usercentrics-button.json +++ b/rules/autoconsent/usercentrics-button.json @@ -1,14 +1,28 @@ { - "name": "usercentrics-button", - "detectCmp": [{ "exists": "#usercentrics-button" }], - "detectPopup": [ - { "visible": "#usercentrics-button #uc-btn-accept-banner" } - ], - "optIn": [ - { "click": "#usercentrics-button #uc-btn-accept-banner" } - ], - "optOut": [ - { "click": "#usercentrics-button #uc-btn-deny-banner" } - ], - "test": [{ "eval": "JSON.parse(localStorage.getItem('usercentrics')).consents.every(c => c.isEssential || !c.consentStatus)" }] -} + "name": "usercentrics-button", + "detectCmp": [ + { + "exists": "#usercentrics-button" + } + ], + "detectPopup": [ + { + "visible": "#usercentrics-button #uc-btn-accept-banner" + } + ], + "optIn": [ + { + "click": "#usercentrics-button #uc-btn-accept-banner" + } + ], + "optOut": [ + { + "click": "#usercentrics-button #uc-btn-deny-banner" + } + ], + "test": [ + { + "eval": "USERCENTRICS_BUTTON_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/waitrose.json b/rules/autoconsent/waitrose.json index a99dfbb9..87adcf0c 100644 --- a/rules/autoconsent/waitrose.json +++ b/rules/autoconsent/waitrose.json @@ -1,28 +1,42 @@ { - "name": "waitrose.com", - "prehideSelectors": [ - "div[aria-labelledby=CookieAlertModalHeading]", - "section[data-test=initial-waitrose-cookie-consent-banner]", - "section[data-test=cookie-consent-modal]" - ], - "detectCmp": [{ "exists": "section[data-test=initial-waitrose-cookie-consent-banner]"}], - "detectPopup": [{ "visible": "section[data-test=initial-waitrose-cookie-consent-banner]" }], - "optIn": [{ "click": "button[data-test=accept-all]" }], - "optOut": [ - { - "click": "button[data-test=manage-cookies]" - }, - { - "wait": 200 - }, - { - "eval": "Array.from(document.querySelectorAll('label[id$=cookies-deny-label]')).forEach(e => e.click()) || true" - }, - { - "click": "button[data-test=submit]" - } - ], - "test": [ - {"eval": "document.cookie.includes('wtr_cookies_advertising=0') && document.cookie.includes('wtr_cookies_analytics=0')"} - ] -} + "name": "waitrose.com", + "prehideSelectors": [ + "div[aria-labelledby=CookieAlertModalHeading]", + "section[data-test=initial-waitrose-cookie-consent-banner]", + "section[data-test=cookie-consent-modal]" + ], + "detectCmp": [ + { + "exists": "section[data-test=initial-waitrose-cookie-consent-banner]" + } + ], + "detectPopup": [ + { + "visible": "section[data-test=initial-waitrose-cookie-consent-banner]" + } + ], + "optIn": [ + { + "click": "button[data-test=accept-all]" + } + ], + "optOut": [ + { + "click": "button[data-test=manage-cookies]" + }, + { + "wait": 200 + }, + { + "eval": "WAITROSE_0" + }, + { + "click": "button[data-test=submit]" + } + ], + "test": [ + { + "eval": "WAITROSE_1" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/wp-cookie-notice.json b/rules/autoconsent/wp-cookie-notice.json index bcb86940..7718abf5 100644 --- a/rules/autoconsent/wp-cookie-notice.json +++ b/rules/autoconsent/wp-cookie-notice.json @@ -1,12 +1,32 @@ { - "name": "WP Cookie Notice for GDPR", - "comment": "https://wordpress.org/plugins/gdpr-cookie-consent/", - "prehideSelectors": ["#gdpr-cookie-consent-bar"], - "detectCmp": [{ "exists": "#gdpr-cookie-consent-bar" }], - "detectPopup": [{ "visible": "#gdpr-cookie-consent-bar" }], - "optIn": [ { "waitForThenClick": "#gdpr-cookie-consent-bar #cookie_action_accept" } ], - "optOut": [ { "waitForThenClick": "#gdpr-cookie-consent-bar #cookie_action_reject" } ], - "test": [ - { "eval": "document.cookie.includes('wpl_viewed_cookie=no')" } - ] + "name": "WP Cookie Notice for GDPR", + "comment": "https://wordpress.org/plugins/gdpr-cookie-consent/", + "prehideSelectors": [ + "#gdpr-cookie-consent-bar" + ], + "detectCmp": [ + { + "exists": "#gdpr-cookie-consent-bar" + } + ], + "detectPopup": [ + { + "visible": "#gdpr-cookie-consent-bar" + } + ], + "optIn": [ + { + "waitForThenClick": "#gdpr-cookie-consent-bar #cookie_action_accept" + } + ], + "optOut": [ + { + "waitForThenClick": "#gdpr-cookie-consent-bar #cookie_action_reject" + } + ], + "test": [ + { + "eval": "WP_COOKIE_NOTICE_0" + } + ] } \ No newline at end of file diff --git a/rules/autoconsent/xing.json b/rules/autoconsent/xing.json index 6ded96a1..0fb5fb3f 100644 --- a/rules/autoconsent/xing.json +++ b/rules/autoconsent/xing.json @@ -1,15 +1,31 @@ { - "name": "xing.com", - "detectCmp": [{ "exists": "div[class^=cookie-consent-CookieConsent]" }], - "detectPopup": [{ "exists": "div[class^=cookie-consent-CookieConsent]" }], - "optIn": [{ "click": "#consent-accept-button" }], - "optOut": [ - { - "click": "#consent-settings-button" - }, - { - "click": ".consent-banner-button-accept-overlay" - } - ], - "test": [{"eval": "document.cookie.includes('userConsent=%7B%22marketing%22%3Afalse')"}] -} + "name": "xing.com", + "detectCmp": [ + { + "exists": "div[class^=cookie-consent-CookieConsent]" + } + ], + "detectPopup": [ + { + "exists": "div[class^=cookie-consent-CookieConsent]" + } + ], + "optIn": [ + { + "click": "#consent-accept-button" + } + ], + "optOut": [ + { + "click": "#consent-settings-button" + }, + { + "click": ".consent-banner-button-accept-overlay" + } + ], + "test": [ + { + "eval": "XING_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/youtube-desktop.json b/rules/autoconsent/youtube-desktop.json index b13e1cb9..c8066b5c 100644 --- a/rules/autoconsent/youtube-desktop.json +++ b/rules/autoconsent/youtube-desktop.json @@ -1,23 +1,44 @@ { - "name": "youtube-desktop", - "prehideSelectors": ["tp-yt-iron-overlay-backdrop.opened", "ytd-consent-bump-v2-lightbox"], - "detectCmp": [ - { "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" }, - { "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog a[href^=\"https://consent.youtube.com/\"]" } - ], - "detectPopup": [ - { "visible": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" } - ], - "optIn": [ - { "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child button" }, - { "wait": 500 } - ], - "optOut": [ - { "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child button" }, - { "wait": 500 } - ], - "test": [ - { "wait": 500 }, - { "eval": "!!document.cookie.match(/SOCS=CAE/)" } - ] -} + "name": "youtube-desktop", + "prehideSelectors": [ + "tp-yt-iron-overlay-backdrop.opened", + "ytd-consent-bump-v2-lightbox" + ], + "detectCmp": [ + { + "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" + }, + { + "exists": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog a[href^=\"https://consent.youtube.com/\"]" + } + ], + "detectPopup": [ + { + "visible": "ytd-consent-bump-v2-lightbox tp-yt-paper-dialog" + } + ], + "optIn": [ + { + "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:last-child button" + }, + { + "wait": 500 + } + ], + "optOut": [ + { + "waitForThenClick": "ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child #button,ytd-consent-bump-v2-lightbox .eom-buttons .eom-button-row:first-child ytd-button-renderer:first-child button" + }, + { + "wait": 500 + } + ], + "test": [ + { + "wait": 500 + }, + { + "eval": "YOUTUBE_DESKTOP_0" + } + ] +} \ No newline at end of file diff --git a/rules/autoconsent/youtube-mobile.json b/rules/autoconsent/youtube-mobile.json index 123bde57..2e370db2 100644 --- a/rules/autoconsent/youtube-mobile.json +++ b/rules/autoconsent/youtube-mobile.json @@ -1,22 +1,40 @@ { - "name": "youtube-mobile", - "prehideSelectors": [".consent-bump-v2-lightbox"], - "detectCmp": [ - { "exists": "ytm-consent-bump-v2-renderer" } - ], - "detectPopup": [ - { "visible": "ytm-consent-bump-v2-renderer" } - ], - "optIn": [ - { "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:first-child button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:first-child button" }, - { "wait": 500 } - ], - "optOut": [ - { "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:nth-child(2) button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:nth-child(2) button" }, - { "wait": 500 } - ], - "test": [ - { "wait": 500 }, - { "eval": "!!document.cookie.match(/SOCS=CAE/)" } - ] -} + "name": "youtube-mobile", + "prehideSelectors": [ + ".consent-bump-v2-lightbox" + ], + "detectCmp": [ + { + "exists": "ytm-consent-bump-v2-renderer" + } + ], + "detectPopup": [ + { + "visible": "ytm-consent-bump-v2-renderer" + } + ], + "optIn": [ + { + "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:first-child button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:first-child button" + }, + { + "wait": 500 + } + ], + "optOut": [ + { + "waitForThenClick": "ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons c3-material-button:nth-child(2) button, ytm-consent-bump-v2-renderer .privacy-terms + .one-col-dialog-buttons ytm-button-renderer:nth-child(2) button" + }, + { + "wait": 500 + } + ], + "test": [ + { + "wait": 500 + }, + { + "eval": "YOUTUBE_MOBILE_0" + } + ] +} \ No newline at end of file