Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled Tumblr, Paypal, Amazon #279

Merged
merged 4 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 14 additions & 46 deletions cookie-banner-rules-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@
"skipPresenceVisibilityCheck": true
}
},
{
"id": "disabled",
"domains": [
"tumblr.com",
"paypal.com",
"amazon.se",
"amazon.fr",
"amazon.nl",
"amazon.es",
"amazon.co.uk",
"amazon.de",
"amazon.it"
]
},
{
"click": {
"optIn": "button.btn-accept",
Expand Down Expand Up @@ -606,23 +620,6 @@
"id": "31dc6160-3495-4f4e-8c67-594527bd4051",
"domains": ["bing.com"]
},
{
"click": {
"optIn": "button#acceptAllButton",
"optOut": "button#bannerDeclineButton",
"presence": "div#gdprCookieBanner"
},
"cookies": {
"optOut": [
{
"name": "cookie_prefs",
"value": "T%3D0%2CP%3D0%2CF%3D0%2Ctype%3Dexplicit_banner"
}
]
},
"id": "3f1e21e7-327f-42de-ac40-25da7f4fa7c9",
"domains": ["paypal.com"]
},
{
"click": {},
"cookies": {
Expand Down Expand Up @@ -666,17 +663,6 @@
"id": "37319f5d-9484-4da8-aee1-570a78688da3",
"domains": ["yandex.com", "yandex.ru", "ya.ru", "kinopoisk.ru"]
},
{
"click": {},
"cookies": {
"optOut": [
{ "name": "euconsent-v2", "value": "1" },
{ "name": "euconsent-v2-noniab", "value": "AAYA" }
]
},
"id": "e8f941e6-ac56-4dec-b682-a75e8bd52aae",
"domains": ["tumblr.com"]
},
{
"click": {},
"cookies": {
Expand Down Expand Up @@ -2451,24 +2437,6 @@
"id": "eb274e15-29fe-4004-9e6d-27046bd0b82d",
"domains": ["td.com"]
},
{
"click": {
"optIn": "span.a-button-inner",
"optOut": "a#sp-cc-rejectall-link",
"presence": "form#sp-cc"
},
"cookies": {},
"id": "1653780d-92d7-4677-acb0-6427a7bbdeba",
"domains": [
"amazon.se",
"amazon.fr",
"amazon.nl",
"amazon.es",
"amazon.co.uk",
"amazon.de",
"amazon.it"
]
},
{
"click": {
"optIn": "button.fc-cta-consent",
Expand Down
6 changes: 6 additions & 0 deletions test/validateRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const { exit } = require("process");

const RULE_LIST_FILE = "cookie-banner-rules-list.json";

// ID of the rule which contains sites where the mechanism is disabled.
const RULE_ID_DISABLED = "disabled";

let fetch;

/**
Expand Down Expand Up @@ -90,9 +93,12 @@ const ajv = new Ajv({ loadSchema, allErrors: true });

// 4. Check for empty rules that have no click or cookie injection rule.
artines1 marked this conversation as resolved.
Show resolved Hide resolved
// Allow detect-only click rules that only have a presence field.
// Also allow the "disabled" rule which contains all sites the mechanism is
// disabled for.
let foundEmptyRules = false;
ruleList.data.forEach((rule, i) => {
if (
rule.id !== RULE_ID_DISABLED &&
!rule.cookies?.optIn?.length &&
!rule.cookies?.optOut?.length &&
!rule.click?.presence
Expand Down