Compare commits
1 Commits
e18aa7b7eb
...
d623441079
Author | SHA1 | Date | |
---|---|---|---|
d623441079 |
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Cookie Dialog Monster
|
# Cookie Dialog Monster
|
||||||
|
|
||||||
Cookie Dialog Monster is a browser extension that hides cookie consent dialogs without changing user preferences. By default, we do NOT accept cookies (except in [a few cases](https://git.wanhose.dev/wanhose/cookie-dialog-monster/src/branch/main/database.json) where the pages do not function without accepting them). You can report broken sites with a single click, which will create an issue in this repository to be fixed promptly.
|
Cookie Dialog Monster is a browser extension that hides cookie consent dialogs without changing user preferences. By default, we do NOT accept cookies (except in [a few cases](https://git.wanhose.dev/wanhose/cookie-dialog-monster/src/branch/main/database.json#L248) where the pages do not function without accepting them). You can report broken sites with a single click, which will create an issue in this repository to be fixed promptly.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
713
database.json
713
database.json
@ -1,257 +1,547 @@
|
|||||||
{
|
{
|
||||||
"actions": [
|
"commonWords": [
|
||||||
|
"ablehnen",
|
||||||
|
"accept",
|
||||||
|
"accepta",
|
||||||
|
"accepter",
|
||||||
|
"accettare",
|
||||||
|
"accordo",
|
||||||
|
"aceitar",
|
||||||
|
"aceptar",
|
||||||
|
"acuerdo",
|
||||||
|
"advertising",
|
||||||
|
"agree",
|
||||||
|
"akzeptieren",
|
||||||
|
"analitica",
|
||||||
|
"analítica",
|
||||||
|
"analitice",
|
||||||
|
"analityka",
|
||||||
|
"analyse",
|
||||||
|
"analytics",
|
||||||
|
"analytique",
|
||||||
|
"baner",
|
||||||
|
"banner",
|
||||||
|
"bannière",
|
||||||
|
"cc",
|
||||||
|
"cerrar",
|
||||||
|
"chiudere",
|
||||||
|
"close",
|
||||||
|
"cmp",
|
||||||
|
"compliance",
|
||||||
|
"concordar",
|
||||||
|
"confidențialitate",
|
||||||
|
"confidentialité",
|
||||||
|
"configuraciones",
|
||||||
|
"configurações",
|
||||||
|
"conformidade",
|
||||||
|
"conformità",
|
||||||
|
"conformitate",
|
||||||
|
"conformité",
|
||||||
|
"consenso",
|
||||||
|
"consent",
|
||||||
|
"consentement",
|
||||||
|
"consentimento",
|
||||||
|
"consentimiento",
|
||||||
|
"consimțământ",
|
||||||
|
"cookie",
|
||||||
|
"cumplimiento",
|
||||||
|
"d'accord",
|
||||||
|
"dados",
|
||||||
|
"dane",
|
||||||
|
"data",
|
||||||
|
"date",
|
||||||
|
"daten",
|
||||||
|
"datenschutz",
|
||||||
|
"dati",
|
||||||
|
"datos",
|
||||||
|
"de acord",
|
||||||
|
"declinar",
|
||||||
|
"declinare",
|
||||||
|
"decline",
|
||||||
|
"décliner",
|
||||||
|
"déni",
|
||||||
|
"descargo de responsabilidad",
|
||||||
|
"desempenho",
|
||||||
|
"dialog",
|
||||||
|
"dialogo",
|
||||||
|
"diálogo",
|
||||||
|
"dialogue",
|
||||||
|
"disclaimer",
|
||||||
|
"disconoscimento",
|
||||||
|
"données",
|
||||||
|
"dritte",
|
||||||
|
"einstellungen",
|
||||||
|
"einwilligung",
|
||||||
|
"fechar",
|
||||||
|
"fermer",
|
||||||
|
"fonctionnel",
|
||||||
|
"funcional",
|
||||||
|
"functional",
|
||||||
|
"funcțional",
|
||||||
|
"funkcjonalny",
|
||||||
|
"funktional",
|
||||||
|
"funzionale",
|
||||||
|
"gdpr",
|
||||||
|
"gerenciar",
|
||||||
|
"gérer",
|
||||||
|
"gesetz",
|
||||||
|
"gestiona",
|
||||||
|
"gestionar",
|
||||||
|
"gestire",
|
||||||
|
"guardar",
|
||||||
|
"haftungsausschluss",
|
||||||
|
"impostazioni",
|
||||||
|
"închide",
|
||||||
|
"informação",
|
||||||
|
"información",
|
||||||
|
"informacja",
|
||||||
|
"informații",
|
||||||
|
"information",
|
||||||
|
"informazione",
|
||||||
|
"isenção de responsabilidade",
|
||||||
|
"konformität",
|
||||||
|
"konieczny",
|
||||||
|
"law",
|
||||||
|
"lege",
|
||||||
|
"legge",
|
||||||
|
"lei",
|
||||||
|
"leistung",
|
||||||
|
"ley",
|
||||||
|
"loi",
|
||||||
|
"manage",
|
||||||
|
"necesar",
|
||||||
|
"necesario",
|
||||||
|
"nécessaire",
|
||||||
|
"necessario",
|
||||||
|
"necessário",
|
||||||
|
"necessary",
|
||||||
|
"notwendig",
|
||||||
|
"nutzung",
|
||||||
|
"odmówić",
|
||||||
|
"odrzucić",
|
||||||
|
"opcional",
|
||||||
|
"opcjonalny",
|
||||||
|
"optional",
|
||||||
|
"opțional",
|
||||||
|
"optionnel",
|
||||||
|
"opzionale",
|
||||||
|
"paramètres",
|
||||||
|
"performance",
|
||||||
|
"performanță",
|
||||||
|
"personalisierung",
|
||||||
|
"personalização",
|
||||||
|
"personalización",
|
||||||
|
"personalizacja",
|
||||||
|
"personalizare",
|
||||||
|
"personalization",
|
||||||
|
"personalizzazione",
|
||||||
|
"personnalisation",
|
||||||
|
"policy",
|
||||||
|
"politica",
|
||||||
|
"politică",
|
||||||
|
"política",
|
||||||
|
"politik",
|
||||||
|
"politique",
|
||||||
|
"polityka",
|
||||||
|
"popup",
|
||||||
|
"präferenzen",
|
||||||
|
"prawo",
|
||||||
|
"preferences",
|
||||||
|
"préférences",
|
||||||
|
"preferencias",
|
||||||
|
"preferências",
|
||||||
|
"preferencje",
|
||||||
|
"preferenze",
|
||||||
|
"preferințe",
|
||||||
|
"prestazioni",
|
||||||
|
"privacidad",
|
||||||
|
"privacidade",
|
||||||
|
"privacy",
|
||||||
|
"prywatność",
|
||||||
|
"pubblicità",
|
||||||
|
"publicidad",
|
||||||
|
"publicidade",
|
||||||
|
"publicitate",
|
||||||
|
"publicité",
|
||||||
|
"rastreamento",
|
||||||
|
"rechazar",
|
||||||
|
"refuza",
|
||||||
|
"reject",
|
||||||
|
"rejeitar",
|
||||||
|
"rejeter",
|
||||||
|
"reklama",
|
||||||
|
"rendimiento",
|
||||||
|
"respinge",
|
||||||
|
"rifiutare",
|
||||||
|
"salva",
|
||||||
|
"salvar",
|
||||||
|
"salvare",
|
||||||
|
"sauvegarder",
|
||||||
|
"save",
|
||||||
|
"schließen",
|
||||||
|
"seguimiento",
|
||||||
|
"setări",
|
||||||
|
"settings",
|
||||||
|
"śledzenie",
|
||||||
|
"speichern",
|
||||||
|
"strona trzecia",
|
||||||
|
"suivi",
|
||||||
|
"terceiro",
|
||||||
|
"tercero",
|
||||||
|
"terță parte",
|
||||||
|
"terza parte",
|
||||||
|
"third-party",
|
||||||
|
"tiers",
|
||||||
|
"tracciamento",
|
||||||
|
"tracking",
|
||||||
|
"urmărire",
|
||||||
|
"usage",
|
||||||
|
"uso",
|
||||||
|
"ustawienia",
|
||||||
|
"utilisation",
|
||||||
|
"utilizare",
|
||||||
|
"użycie",
|
||||||
|
"verfolgung",
|
||||||
|
"verwalten",
|
||||||
|
"werbung",
|
||||||
|
"wydajność",
|
||||||
|
"zaakceptować",
|
||||||
|
"zamknij",
|
||||||
|
"zapisz",
|
||||||
|
"zarządzać",
|
||||||
|
"zgoda",
|
||||||
|
"zgodność",
|
||||||
|
"zgodzić się",
|
||||||
|
"zrzeczenie się",
|
||||||
|
"zustimmen",
|
||||||
|
"аналитика",
|
||||||
|
"баннер",
|
||||||
|
"всплывающее окно",
|
||||||
|
"данные",
|
||||||
|
"диалог",
|
||||||
|
"закон",
|
||||||
|
"закрыть",
|
||||||
|
"информация",
|
||||||
|
"использование",
|
||||||
|
"конфиденциальность",
|
||||||
|
"настройки",
|
||||||
|
"необходимо",
|
||||||
|
"опционально",
|
||||||
|
"отказ",
|
||||||
|
"отказаться",
|
||||||
|
"отклонить",
|
||||||
|
"отслеживание",
|
||||||
|
"персонализация",
|
||||||
|
"политика",
|
||||||
|
"предпочтения",
|
||||||
|
"принять",
|
||||||
|
"производительность",
|
||||||
|
"реклама",
|
||||||
|
"согласен",
|
||||||
|
"согласие",
|
||||||
|
"соответствие",
|
||||||
|
"сохранить",
|
||||||
|
"третья сторона",
|
||||||
|
"управлять",
|
||||||
|
"функциональный"
|
||||||
|
],
|
||||||
|
"fixes": [
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "action.com",
|
"domain": "action.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "#CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll"
|
"selector": "#CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "resetAll",
|
||||||
"domain": "automobielmanagement.nl",
|
"domain": "automobielmanagement.nl",
|
||||||
"name": "resetAll",
|
|
||||||
"property": "filter",
|
"property": "filter",
|
||||||
"selector": "body > *"
|
"selector": "body > *"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "bilbaomuseoa.eus",
|
"domain": "bilbaomuseoa.eus",
|
||||||
"name": "click",
|
|
||||||
"selector": ".alert_message .btn-confirm"
|
"selector": ".alert_message .btn-confirm"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "resetAll",
|
||||||
"domain": "breitbart.com",
|
"domain": "breitbart.com",
|
||||||
"name": "resetAll",
|
|
||||||
"property": "display",
|
"property": "display",
|
||||||
"selector": ".twitter-tweet"
|
"selector": ".twitter-tweet"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "resetAll",
|
||||||
"domain": "breitbart.com",
|
"domain": "breitbart.com",
|
||||||
"name": "resetAll",
|
|
||||||
"property": "visibility",
|
"property": "visibility",
|
||||||
"selector": ".twitter-tweet"
|
"selector": ".twitter-tweet"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "buscotelefonosgratis.es",
|
"domain": "buscotelefonosgratis.es",
|
||||||
"name": "click",
|
|
||||||
"selector": "#cookie_action_close_header_reject"
|
"selector": "#cookie_action_close_header_reject"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "chollometro.com",
|
"domain": "chollometro.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "classicube.net",
|
"domain": "classicube.net",
|
||||||
"name": "click",
|
|
||||||
"selector": "#acceptcookies"
|
"selector": "#acceptcookies"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "compact-online.de",
|
"domain": "compact-online.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "[id*=\"bnnr-body-rightSide-\"] div + div > span"
|
"selector": "[id*=\"bnnr-body-rightSide-\"] div + div > span"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "consent.google",
|
"domain": "consent.google",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-label=\"Alle ablehnen\"], [aria-label=\"Odrzuć wszystko\"], [aria-label=\"Rechazar todo\"], [aria-label=\"Recusar tudo\"], [aria-label=\"Reject all\"], [aria-label=\"Rejeitar tudo\"], [aria-label=\"Respinge tot\"], [aria-label=\"Rifiuta tutto\"], [aria-label=\"Tout refuser\"], [aria-label=\"Отклонить все\"]"
|
"selector": "[aria-label=\"Alle ablehnen\"], [aria-label=\"Odrzuć wszystko\"], [aria-label=\"Rechazar todo\"], [aria-label=\"Recusar tudo\"], [aria-label=\"Reject all\"], [aria-label=\"Rejeitar tudo\"], [aria-label=\"Respinge tot\"], [aria-label=\"Rifiuta tutto\"], [aria-label=\"Tout refuser\"], [aria-label=\"Отклонить все\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "consent.yahoo",
|
"domain": "consent.yahoo",
|
||||||
"name": "click",
|
|
||||||
"selector": ".reject-all"
|
"selector": ".reject-all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "consent.youtube",
|
"domain": "consent.youtube",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-label=\"Alle ablehnen\"], [aria-label=\"Odrzuć wszystko\"], [aria-label=\"Rechazar todo\"], [aria-label=\"Recusar tudo\"], [aria-label=\"Reject all\"], [aria-label=\"Rejeitar tudo\"], [aria-label=\"Respinge tot\"], [aria-label=\"Rifiuta tutto\"], [aria-label=\"Tout refuser\"], [aria-label=\"Отклонить все\"]"
|
"selector": "[aria-label=\"Alle ablehnen\"], [aria-label=\"Odrzuć wszystko\"], [aria-label=\"Rechazar todo\"], [aria-label=\"Recusar tudo\"], [aria-label=\"Reject all\"], [aria-label=\"Rejeitar tudo\"], [aria-label=\"Respinge tot\"], [aria-label=\"Rifiuta tutto\"], [aria-label=\"Tout refuser\"], [aria-label=\"Отклонить все\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "dailymotion.com",
|
"domain": "dailymotion.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-label=\"Continue without accepting\"]"
|
"selector": "[aria-label=\"Continue without accepting\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "dealabs.com",
|
"domain": "dealabs.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "derstandard",
|
"domain": "derstandard",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-label=\"Einverstanden\"]"
|
"selector": "[aria-label=\"Einverstanden\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "fiberplane.dev",
|
"domain": "fiberplane.dev",
|
||||||
"name": "click",
|
|
||||||
"selector": "button[aria-label=\"Close Banner\"]"
|
"selector": "button[aria-label=\"Close Banner\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "foto-erhardt.de",
|
"domain": "foto-erhardt.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "[class=\"modal show\"]"
|
"selector": "[class=\"modal show\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "reset",
|
||||||
"domain": "gamestar.de",
|
"domain": "gamestar.de",
|
||||||
"name": "reset",
|
|
||||||
"property": "filter",
|
"property": "filter",
|
||||||
"selector": "#content"
|
"selector": "#content"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "gettr.com",
|
"domain": "gettr.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "button.bold"
|
"selector": "button.bold"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "gib-uns-deinen-gebrauchten.de",
|
"domain": "gib-uns-deinen-gebrauchten.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "#cookie-banner-accept-selected-button"
|
"selector": "#cookie-banner-accept-selected-button"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "gmx.com",
|
"domain": "gmx.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "#onetrust-accept-btn-handler"
|
"selector": "#onetrust-accept-btn-handler"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "gmx.net",
|
"domain": "gmx.net",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-id=\"save-all-pur\"]"
|
"selector": "[data-id=\"save-all-pur\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "golem.de",
|
"domain": "golem.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "[title=\"Zustimmen und weiter\"]"
|
"selector": "[title=\"Zustimmen und weiter\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "google",
|
"domain": "google",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-modal=\"true\"][role=\"dialog\"]:has([href*=\"policies.google.com/technologies/cookies\"]) button:not([aria-label]):not([role=\"link\"])"
|
"selector": "[aria-modal=\"true\"][role=\"dialog\"]:has([href*=\"policies.google.com/technologies/cookies\"]) button:not([aria-label]):not([role=\"link\"])"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "hagglezon.com",
|
"domain": "hagglezon.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-test=\"cookie-submit\"]"
|
"selector": "[data-test=\"cookie-submit\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "instagram.com",
|
"domain": "instagram.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[role=\"dialog\"] > [style=\"display: flex; flex-direction: column; height: 100%; max-width: 100%;\"] > button"
|
"selector": "[role=\"dialog\"] > [style=\"display: flex; flex-direction: column; height: 100%; max-width: 100%;\"] > button"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "motorolasound.com",
|
"domain": "motorolasound.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "#cookie-btn-denied"
|
"selector": "#cookie-btn-denied"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "mydealz.de",
|
"domain": "mydealz.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
"selector": "[data-t=\"continueWithoutAccepting\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"domain": "myprivacy.dpgmedia",
|
"action": "reload",
|
||||||
"name": "reload"
|
"domain": "myprivacy.dpgmedia"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "off-campers.com",
|
"domain": "off-campers.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[form=\"cookie-consent-form\"][value=\"deny\"]"
|
"selector": "[form=\"cookie-consent-form\"][value=\"deny\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "reset",
|
||||||
"domain": "orcd.co",
|
"domain": "orcd.co",
|
||||||
"name": "reset",
|
|
||||||
"property": "opacity",
|
"property": "opacity",
|
||||||
"selector": ".player-container.box-shadow"
|
"selector": ".player-container.box-shadow"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "resetAll",
|
||||||
"domain": ".pl",
|
"domain": ".pl",
|
||||||
"name": "resetAll",
|
|
||||||
"property": "filter",
|
"property": "filter",
|
||||||
"selector": "body:has(.advertisement.contentAds.ads.adsbygoogle.top-banners.adbanner.bannerAd.ad-google.AdSense:first-child) > *"
|
"selector": "body:has(.advertisement.contentAds.ads.adsbygoogle.top-banners.adbanner.bannerAd.ad-google.AdSense:first-child) > *"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "reset",
|
||||||
"domain": "play.google",
|
"domain": "play.google",
|
||||||
"name": "reset",
|
|
||||||
"property": "z-index",
|
"property": "z-index",
|
||||||
"selector": "body > div"
|
"selector": "body > div"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "popeyes.es",
|
"domain": "popeyes.es",
|
||||||
"name": "click",
|
|
||||||
"selector": ".cookie-buttons > .cookie-buttons-column > div:last-child"
|
"selector": ".cookie-buttons > .cookie-buttons-column > div:last-child"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "producthunt.com",
|
"domain": "producthunt.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-test=\"dismiss-CookiePopup\"] button"
|
"selector": "[data-test=\"dismiss-CookiePopup\"] button"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "reddit.com",
|
"domain": "reddit.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "#SHORTCUT_FOCUSABLE_DIV [style*=\"--Toaster\"] section:last-child section:last-child button"
|
"selector": "#SHORTCUT_FOCUSABLE_DIV [style*=\"--Toaster\"] section:last-child section:last-child button"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "reset",
|
||||||
"domain": "resonanz-labor.de",
|
"domain": "resonanz-labor.de",
|
||||||
"name": "reset",
|
|
||||||
"property": "overflow",
|
"property": "overflow",
|
||||||
"selector": "#wrapwrap"
|
"selector": "#wrapwrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "staylibere.com",
|
"domain": "staylibere.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[class*=\"LayoutCookieBanner_buttons\"] > button:last-child"
|
"selector": "[class*=\"LayoutCookieBanner_buttons\"] > button:last-child"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "reset",
|
||||||
"domain": "thetvdb.com",
|
"domain": "thetvdb.com",
|
||||||
"name": "reset",
|
|
||||||
"property": "overflow",
|
"property": "overflow",
|
||||||
"selector": "body"
|
"selector": "body"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "twitch.tv",
|
"domain": "twitch.tv",
|
||||||
"name": "click",
|
|
||||||
"selector": "[data-a-target=\"consent-banner-accept\"]"
|
"selector": "[data-a-target=\"consent-banner-accept\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "usnews.com",
|
"domain": "usnews.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "#gdpr-modal-agree"
|
"selector": "#gdpr-modal-agree"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "web.de",
|
"domain": "web.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "#reminder"
|
"selector": "#reminder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "web.dev",
|
"domain": "web.dev",
|
||||||
"name": "click",
|
|
||||||
"selector": "a[href*=\"cookies\"] + button"
|
"selector": "a[href*=\"cookies\"] + button"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "youtube.com",
|
"domain": "youtube.com",
|
||||||
"name": "click",
|
|
||||||
"selector": "[aria-label*=\"ablehnen\"], [aria-label*=\"Reject\"], [aria-label*=\"Rechazar\"], [aria-label*=\"refuser\"], [aria-label*=\"Rifiuta\"], [aria-label*=\"Nie wyrażaj zgody\"], [aria-label*=\"Rejeitar\"], [aria-label*=\"Recusar\"], [aria-label*=\"Resping\"], [aria-label*=\"Запретить\"]"
|
"selector": "[aria-label*=\"ablehnen\"], [aria-label*=\"Reject\"], [aria-label*=\"Rechazar\"], [aria-label*=\"refuser\"], [aria-label*=\"Rifiuta\"], [aria-label*=\"Nie wyrażaj zgody\"], [aria-label*=\"Rejeitar\"], [aria-label*=\"Recusar\"], [aria-label*=\"Resping\"], [aria-label*=\"Запретить\"]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "zdf.de",
|
"domain": "zdf.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "#aria-dialog-cmp-error-dialog > .dialog-close"
|
"selector": "#aria-dialog-cmp-error-dialog > .dialog-close"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"action": "click",
|
||||||
"domain": "zeit.de",
|
"domain": "zeit.de",
|
||||||
"name": "click",
|
|
||||||
"selector": "[title=\"ACCEPT AND CONTINUE\"]"
|
"selector": "[title=\"ACCEPT AND CONTINUE\"]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"exclusions": {
|
"rules": [
|
||||||
"domains": [
|
"||app.usercentrics.eu^",
|
||||||
"*.bauhaus.cz",
|
"||b2brouter.net/de/wp-content/plugins/cookies-and-content-security-policy^",
|
||||||
"*.codesandbox.io",
|
"||benno-gymnasium.de/plugins/system/gdpr^",
|
||||||
"*.cookie-dialog-monster.com",
|
"||c.evidon.com^",
|
||||||
"*.facebook.com",
|
"||cdn-cookieyes.com^",
|
||||||
"*.googleapis.com",
|
"||cdn.consentmanager.net^",
|
||||||
"*.olympics.com",
|
"||cdn.cookielaw.org^",
|
||||||
"translate.google.*",
|
"||cdn.optable.co^",
|
||||||
"www.youtube-nocookie.com",
|
"||cdn.trustcommander.net/privacy^",
|
||||||
"www.youtube.com"
|
"||cdntranscend.eventbrite.com^",
|
||||||
|
"||chollometro.com/assets/js/CookiesMessage*.js^",
|
||||||
|
"||city-bahn.de/wp-content/plugins/borlabs-cookie^",
|
||||||
|
"||cmp.huffingtonpost.fr^",
|
||||||
|
"||cmp.inmobi.com^",
|
||||||
|
"||cmp.prisa.com^",
|
||||||
|
"||cmp.uniconsent.com^",
|
||||||
|
"||cms.static-bahn.de/cms/consent-layer^",
|
||||||
|
"||consent.cookiebot.com^",
|
||||||
|
"||consent.cookiefirst.com^",
|
||||||
|
"||consent.pdf24.org^",
|
||||||
|
"||consent.trustarc.com^",
|
||||||
|
"||consent.up.welt.de^",
|
||||||
|
"||consentbar.interencheres.com^",
|
||||||
|
"||consentcdn.cookiebot.com^",
|
||||||
|
"||cookiehub.net^",
|
||||||
|
"||cp.as.com^",
|
||||||
|
"||cp.inside-digital.de^",
|
||||||
|
"||download.amd.com/OneTrust^",
|
||||||
|
"||driftingchef.com/static/*/Sticky2,ConsentManager",
|
||||||
|
"||emp.bbci.co.uk^",
|
||||||
|
"||eu.fastcmp.com^",
|
||||||
|
"||forum.vorondesign.com/js/xf/notice.min.js^",
|
||||||
|
"||gdpr-tcfv2.sp-prod.net^",
|
||||||
|
"||get.optad360.io/sf/*/plugin.min.js",
|
||||||
|
"||ilims.de/typo3conf/ext/nb_cookie_banner^",
|
||||||
|
"||itkadmin.de/_javascripts/cookiesolution/es_cookie_solution_sources_v2.js^",
|
||||||
|
"||js.vxcdn.com/usercentrics-sdk^",
|
||||||
|
"||lensois.com/wp-admin/admin-ajax.php",
|
||||||
|
"||media.bzcompany.cz/scookies^",
|
||||||
|
"||myprivacy-static.dpgmedia.net/consent.js^",
|
||||||
|
"||myprivacy.dpgmedia.*/consent^",
|
||||||
|
"||optanon.blob.core.windows.net^",
|
||||||
|
"||privacy.wetransfer.com/fides.js^",
|
||||||
|
"||prod.widgets.burgerprofiel.vlaanderen.be/*/js.cookie.js^",
|
||||||
|
"||redditstatic.com/onetrust.*.js",
|
||||||
|
"||s.nitropay.com/gpp-*.min.js",
|
||||||
|
"||s.p7s1.io/cmp^",
|
||||||
|
"||sdk.privacy-center.org^",
|
||||||
|
"||static.fastcmp.com^",
|
||||||
|
"||transcend-cdn.com^",
|
||||||
|
"||wcpstatic.microsoft.com^",
|
||||||
|
"||webtools.europa.eu/js/webtools.cck.js^",
|
||||||
|
"||widgets.marketcat.net^"
|
||||||
],
|
],
|
||||||
"overflows": [
|
"skips": {
|
||||||
|
"domains": [
|
||||||
"app.diagrams.net",
|
"app.diagrams.net",
|
||||||
"blog.sapegin.me",
|
"blog.sapegin.me",
|
||||||
"buyagift.co.uk",
|
"buyagift.co.uk",
|
||||||
@ -674,307 +964,6 @@
|
|||||||
"YTD-YOODLE-RENDERER"
|
"YTD-YOODLE-RENDERER"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"keywords": [
|
|
||||||
"ablehnen",
|
|
||||||
"accept",
|
|
||||||
"accepta",
|
|
||||||
"accepter",
|
|
||||||
"accettare",
|
|
||||||
"accordo",
|
|
||||||
"aceitar",
|
|
||||||
"aceptar",
|
|
||||||
"acuerdo",
|
|
||||||
"advertising",
|
|
||||||
"agree",
|
|
||||||
"akzeptieren",
|
|
||||||
"analitica",
|
|
||||||
"analítica",
|
|
||||||
"analitice",
|
|
||||||
"analityka",
|
|
||||||
"analyse",
|
|
||||||
"analytics",
|
|
||||||
"analytique",
|
|
||||||
"baner",
|
|
||||||
"banner",
|
|
||||||
"bannière",
|
|
||||||
"cc",
|
|
||||||
"cerrar",
|
|
||||||
"chiudere",
|
|
||||||
"close",
|
|
||||||
"cmp",
|
|
||||||
"compliance",
|
|
||||||
"concordar",
|
|
||||||
"confidențialitate",
|
|
||||||
"confidentialité",
|
|
||||||
"configuraciones",
|
|
||||||
"configurações",
|
|
||||||
"conformidade",
|
|
||||||
"conformità",
|
|
||||||
"conformitate",
|
|
||||||
"conformité",
|
|
||||||
"consenso",
|
|
||||||
"consent",
|
|
||||||
"consentement",
|
|
||||||
"consentimento",
|
|
||||||
"consentimiento",
|
|
||||||
"consimțământ",
|
|
||||||
"cookie",
|
|
||||||
"cumplimiento",
|
|
||||||
"d'accord",
|
|
||||||
"dados",
|
|
||||||
"dane",
|
|
||||||
"data",
|
|
||||||
"date",
|
|
||||||
"daten",
|
|
||||||
"datenschutz",
|
|
||||||
"dati",
|
|
||||||
"datos",
|
|
||||||
"de acord",
|
|
||||||
"declinar",
|
|
||||||
"declinare",
|
|
||||||
"decline",
|
|
||||||
"décliner",
|
|
||||||
"déni",
|
|
||||||
"descargo de responsabilidad",
|
|
||||||
"desempenho",
|
|
||||||
"dialog",
|
|
||||||
"dialogo",
|
|
||||||
"diálogo",
|
|
||||||
"dialogue",
|
|
||||||
"disclaimer",
|
|
||||||
"disconoscimento",
|
|
||||||
"données",
|
|
||||||
"dritte",
|
|
||||||
"einstellungen",
|
|
||||||
"einwilligung",
|
|
||||||
"fechar",
|
|
||||||
"fermer",
|
|
||||||
"fonctionnel",
|
|
||||||
"funcional",
|
|
||||||
"functional",
|
|
||||||
"funcțional",
|
|
||||||
"funkcjonalny",
|
|
||||||
"funktional",
|
|
||||||
"funzionale",
|
|
||||||
"gdpr",
|
|
||||||
"gerenciar",
|
|
||||||
"gérer",
|
|
||||||
"gesetz",
|
|
||||||
"gestiona",
|
|
||||||
"gestionar",
|
|
||||||
"gestire",
|
|
||||||
"guardar",
|
|
||||||
"haftungsausschluss",
|
|
||||||
"impostazioni",
|
|
||||||
"închide",
|
|
||||||
"informação",
|
|
||||||
"información",
|
|
||||||
"informacja",
|
|
||||||
"informații",
|
|
||||||
"information",
|
|
||||||
"informazione",
|
|
||||||
"isenção de responsabilidade",
|
|
||||||
"konformität",
|
|
||||||
"konieczny",
|
|
||||||
"law",
|
|
||||||
"lege",
|
|
||||||
"legge",
|
|
||||||
"lei",
|
|
||||||
"leistung",
|
|
||||||
"ley",
|
|
||||||
"loi",
|
|
||||||
"manage",
|
|
||||||
"necesar",
|
|
||||||
"necesario",
|
|
||||||
"nécessaire",
|
|
||||||
"necessario",
|
|
||||||
"necessário",
|
|
||||||
"necessary",
|
|
||||||
"notwendig",
|
|
||||||
"nutzung",
|
|
||||||
"odmówić",
|
|
||||||
"odrzucić",
|
|
||||||
"opcional",
|
|
||||||
"opcjonalny",
|
|
||||||
"optional",
|
|
||||||
"opțional",
|
|
||||||
"optionnel",
|
|
||||||
"opzionale",
|
|
||||||
"paramètres",
|
|
||||||
"performance",
|
|
||||||
"performanță",
|
|
||||||
"personalisierung",
|
|
||||||
"personalização",
|
|
||||||
"personalización",
|
|
||||||
"personalizacja",
|
|
||||||
"personalizare",
|
|
||||||
"personalization",
|
|
||||||
"personalizzazione",
|
|
||||||
"personnalisation",
|
|
||||||
"policy",
|
|
||||||
"politica",
|
|
||||||
"politică",
|
|
||||||
"política",
|
|
||||||
"politik",
|
|
||||||
"politique",
|
|
||||||
"polityka",
|
|
||||||
"popup",
|
|
||||||
"präferenzen",
|
|
||||||
"prawo",
|
|
||||||
"preferences",
|
|
||||||
"préférences",
|
|
||||||
"preferencias",
|
|
||||||
"preferências",
|
|
||||||
"preferencje",
|
|
||||||
"preferenze",
|
|
||||||
"preferințe",
|
|
||||||
"prestazioni",
|
|
||||||
"privacidad",
|
|
||||||
"privacidade",
|
|
||||||
"privacy",
|
|
||||||
"prywatność",
|
|
||||||
"pubblicità",
|
|
||||||
"publicidad",
|
|
||||||
"publicidade",
|
|
||||||
"publicitate",
|
|
||||||
"publicité",
|
|
||||||
"rastreamento",
|
|
||||||
"rechazar",
|
|
||||||
"refuza",
|
|
||||||
"reject",
|
|
||||||
"rejeitar",
|
|
||||||
"rejeter",
|
|
||||||
"reklama",
|
|
||||||
"rendimiento",
|
|
||||||
"respinge",
|
|
||||||
"rifiutare",
|
|
||||||
"salva",
|
|
||||||
"salvar",
|
|
||||||
"salvare",
|
|
||||||
"sauvegarder",
|
|
||||||
"save",
|
|
||||||
"schließen",
|
|
||||||
"seguimiento",
|
|
||||||
"setări",
|
|
||||||
"settings",
|
|
||||||
"śledzenie",
|
|
||||||
"speichern",
|
|
||||||
"strona trzecia",
|
|
||||||
"suivi",
|
|
||||||
"terceiro",
|
|
||||||
"tercero",
|
|
||||||
"terță parte",
|
|
||||||
"terza parte",
|
|
||||||
"third-party",
|
|
||||||
"tiers",
|
|
||||||
"tracciamento",
|
|
||||||
"tracking",
|
|
||||||
"urmărire",
|
|
||||||
"usage",
|
|
||||||
"uso",
|
|
||||||
"ustawienia",
|
|
||||||
"utilisation",
|
|
||||||
"utilizare",
|
|
||||||
"użycie",
|
|
||||||
"verfolgung",
|
|
||||||
"verwalten",
|
|
||||||
"werbung",
|
|
||||||
"wydajność",
|
|
||||||
"zaakceptować",
|
|
||||||
"zamknij",
|
|
||||||
"zapisz",
|
|
||||||
"zarządzać",
|
|
||||||
"zgoda",
|
|
||||||
"zgodność",
|
|
||||||
"zgodzić się",
|
|
||||||
"zrzeczenie się",
|
|
||||||
"zustimmen",
|
|
||||||
"аналитика",
|
|
||||||
"баннер",
|
|
||||||
"всплывающее окно",
|
|
||||||
"данные",
|
|
||||||
"диалог",
|
|
||||||
"закон",
|
|
||||||
"закрыть",
|
|
||||||
"информация",
|
|
||||||
"использование",
|
|
||||||
"конфиденциальность",
|
|
||||||
"настройки",
|
|
||||||
"необходимо",
|
|
||||||
"опционально",
|
|
||||||
"отказ",
|
|
||||||
"отказаться",
|
|
||||||
"отклонить",
|
|
||||||
"отслеживание",
|
|
||||||
"персонализация",
|
|
||||||
"политика",
|
|
||||||
"предпочтения",
|
|
||||||
"принять",
|
|
||||||
"производительность",
|
|
||||||
"реклама",
|
|
||||||
"согласен",
|
|
||||||
"согласие",
|
|
||||||
"соответствие",
|
|
||||||
"сохранить",
|
|
||||||
"третья сторона",
|
|
||||||
"управлять",
|
|
||||||
"функциональный"
|
|
||||||
],
|
|
||||||
"rules": [
|
|
||||||
"||app.usercentrics.eu^",
|
|
||||||
"||b2brouter.net/de/wp-content/plugins/cookies-and-content-security-policy^",
|
|
||||||
"||benno-gymnasium.de/plugins/system/gdpr^",
|
|
||||||
"||c.evidon.com^",
|
|
||||||
"||cdn-cookieyes.com^",
|
|
||||||
"||cdn.consentmanager.net^",
|
|
||||||
"||cdn.cookielaw.org^",
|
|
||||||
"||cdn.optable.co^",
|
|
||||||
"||cdn.trustcommander.net/privacy^",
|
|
||||||
"||cdntranscend.eventbrite.com^",
|
|
||||||
"||chollometro.com/assets/js/CookiesMessage*.js^",
|
|
||||||
"||city-bahn.de/wp-content/plugins/borlabs-cookie^",
|
|
||||||
"||cmp.huffingtonpost.fr^",
|
|
||||||
"||cmp.inmobi.com^",
|
|
||||||
"||cmp.prisa.com^",
|
|
||||||
"||cmp.uniconsent.com^",
|
|
||||||
"||cms.static-bahn.de/cms/consent-layer^",
|
|
||||||
"||consent.cookiebot.com^",
|
|
||||||
"||consent.cookiefirst.com^",
|
|
||||||
"||consent.pdf24.org^",
|
|
||||||
"||consent.trustarc.com^",
|
|
||||||
"||consent.up.welt.de^",
|
|
||||||
"||consentbar.interencheres.com^",
|
|
||||||
"||consentcdn.cookiebot.com^",
|
|
||||||
"||cookiehub.net^",
|
|
||||||
"||cp.as.com^",
|
|
||||||
"||cp.inside-digital.de^",
|
|
||||||
"||download.amd.com/OneTrust^",
|
|
||||||
"||driftingchef.com/static/*/Sticky2,ConsentManager",
|
|
||||||
"||emp.bbci.co.uk^",
|
|
||||||
"||eu.fastcmp.com^",
|
|
||||||
"||forum.vorondesign.com/js/xf/notice.min.js^",
|
|
||||||
"||gdpr-tcfv2.sp-prod.net^",
|
|
||||||
"||get.optad360.io/sf/*/plugin.min.js",
|
|
||||||
"||ilims.de/typo3conf/ext/nb_cookie_banner^",
|
|
||||||
"||itkadmin.de/_javascripts/cookiesolution/es_cookie_solution_sources_v2.js^",
|
|
||||||
"||js.vxcdn.com/usercentrics-sdk^",
|
|
||||||
"||lensois.com/wp-admin/admin-ajax.php",
|
|
||||||
"||media.bzcompany.cz/scookies^",
|
|
||||||
"||myprivacy-static.dpgmedia.net/consent.js^",
|
|
||||||
"||myprivacy.dpgmedia.*/consent^",
|
|
||||||
"||optanon.blob.core.windows.net^",
|
|
||||||
"||privacy.wetransfer.com/fides.js^",
|
|
||||||
"||prod.widgets.burgerprofiel.vlaanderen.be/*/js.cookie.js^",
|
|
||||||
"||redditstatic.com/onetrust.*.js",
|
|
||||||
"||s.nitropay.com/gpp-*.min.js",
|
|
||||||
"||s.p7s1.io/cmp^",
|
|
||||||
"||sdk.privacy-center.org^",
|
|
||||||
"||static.fastcmp.com^",
|
|
||||||
"||transcend-cdn.com^",
|
|
||||||
"||wcpstatic.microsoft.com^",
|
|
||||||
"||webtools.europa.eu/js/webtools.cck.js^",
|
|
||||||
"||widgets.marketcat.net^"
|
|
||||||
],
|
|
||||||
"tokens": {
|
"tokens": {
|
||||||
"backdrops": [
|
"backdrops": [
|
||||||
".cc-policy-overlay",
|
".cc-policy-overlay",
|
||||||
@ -14008,5 +13997,5 @@
|
|||||||
"ytm-consent-bump-v2-renderer"
|
"ytm-consent-bump-v2-renderer"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"version": "1729252494919"
|
"version": "1728300083309"
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,6 @@ import v4ReportRoutes from 'routes/v4/report';
|
|||||||
import v5DataRoutes from 'routes/v5/data';
|
import v5DataRoutes from 'routes/v5/data';
|
||||||
import v5IssuesRoutes from 'routes/v5/issues';
|
import v5IssuesRoutes from 'routes/v5/issues';
|
||||||
import v5ReportRoutes from 'routes/v5/report';
|
import v5ReportRoutes from 'routes/v5/report';
|
||||||
import v6DataRoutes from 'routes/v6/data';
|
|
||||||
import v6IssuesRoutes from 'routes/v6/issues';
|
|
||||||
import v6ReportRoutes from 'routes/v6/report';
|
|
||||||
import environment from 'services/environment';
|
import environment from 'services/environment';
|
||||||
|
|
||||||
const server = fastify({ logger: true });
|
const server = fastify({ logger: true });
|
||||||
@ -42,9 +39,6 @@ server.register(v4ReportRoutes, { prefix: '/rest/v4' });
|
|||||||
server.register(v5DataRoutes, { prefix: '/rest/v5' });
|
server.register(v5DataRoutes, { prefix: '/rest/v5' });
|
||||||
server.register(v5IssuesRoutes, { prefix: '/rest/v5' });
|
server.register(v5IssuesRoutes, { prefix: '/rest/v5' });
|
||||||
server.register(v5ReportRoutes, { prefix: '/rest/v5' });
|
server.register(v5ReportRoutes, { prefix: '/rest/v5' });
|
||||||
server.register(v6DataRoutes, { prefix: '/rest/v6' });
|
|
||||||
server.register(v6IssuesRoutes, { prefix: '/rest/v6' });
|
|
||||||
server.register(v6ReportRoutes, { prefix: '/rest/v6' });
|
|
||||||
|
|
||||||
server.listen({ host: '0.0.0.0', port: environment.port }, (error, address) => {
|
server.listen({ host: '0.0.0.0', port: environment.port }, (error, address) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { parseAction } from 'services/compatibility';
|
import { parseNewFix } from 'services/compatibility';
|
||||||
import environment from 'services/environment';
|
import environment from 'services/environment';
|
||||||
import { RATE_LIMIT_10_PER_MIN } from 'services/rateLimit';
|
import { RATE_LIMIT_10_PER_MIN } from 'services/rateLimit';
|
||||||
|
|
||||||
@ -14,18 +14,17 @@ export default (server: FastifyInstance, _options: RouteShorthandOptions, done:
|
|||||||
},
|
},
|
||||||
async (_request, reply) => {
|
async (_request, reply) => {
|
||||||
try {
|
try {
|
||||||
const database = `${environment.gitea.raw}/database.json`;
|
const url = `${environment.gitea.raw}/database.json`;
|
||||||
const response = await fetch(database);
|
const result = await (await fetch(url)).json();
|
||||||
const { actions, exclusions, keywords, tokens } = await response.json();
|
|
||||||
|
|
||||||
reply.send({
|
reply.send({
|
||||||
data: {
|
data: {
|
||||||
classes: tokens.classes,
|
classes: result.tokens.classes,
|
||||||
commonWords: keywords,
|
commonWords: result.commonWords,
|
||||||
elements: tokens.selectors,
|
elements: result.tokens.selectors,
|
||||||
fixes: actions.map(parseAction),
|
fixes: result.fixes.map(parseNewFix),
|
||||||
skips: exclusions.overflows,
|
skips: result.skips.domains,
|
||||||
tags: exclusions.tags,
|
tags: result.skips.tags,
|
||||||
},
|
},
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { parseAction } from 'services/compatibility';
|
import { parseNewFix } from 'services/compatibility';
|
||||||
import environment from 'services/environment';
|
import environment from 'services/environment';
|
||||||
import { RATE_LIMIT_3_PER_MIN } from 'services/rateLimit';
|
import { RATE_LIMIT_3_PER_MIN } from 'services/rateLimit';
|
||||||
|
|
||||||
@ -14,16 +14,13 @@ export default (server: FastifyInstance, _options: RouteShorthandOptions, done:
|
|||||||
},
|
},
|
||||||
async (_request, reply) => {
|
async (_request, reply) => {
|
||||||
try {
|
try {
|
||||||
const database = `${environment.gitea.raw}/database.json`;
|
const url = `${environment.gitea.raw}/database.json`;
|
||||||
const response = await fetch(database);
|
const result = await (await fetch(url)).json();
|
||||||
const { actions, exclusions, keywords, ...rest } = await response.json();
|
|
||||||
|
|
||||||
reply.send({
|
reply.send({
|
||||||
data: {
|
data: {
|
||||||
...rest,
|
...result,
|
||||||
commonWords: keywords,
|
fixes: result.fixes.map(parseNewFix),
|
||||||
fixes: actions.map(parseAction),
|
|
||||||
skips: { domains: exclusions.overflows, tags: exclusions.tags },
|
|
||||||
},
|
},
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { parseActionName, toDeclarativeNetRequestRule } from 'services/compatibility';
|
|
||||||
import environment from 'services/environment';
|
import environment from 'services/environment';
|
||||||
import { RATE_LIMIT_3_PER_MIN } from 'services/rateLimit';
|
import { RATE_LIMIT_3_PER_MIN } from 'services/rateLimit';
|
||||||
|
|
||||||
@ -14,18 +13,14 @@ export default (server: FastifyInstance, _options: RouteShorthandOptions, done:
|
|||||||
},
|
},
|
||||||
async (_request, reply) => {
|
async (_request, reply) => {
|
||||||
try {
|
try {
|
||||||
const database = `${environment.gitea.raw}/database.json`;
|
|
||||||
const options = { headers: { 'Cache-Control': 'no-cache' } };
|
const options = { headers: { 'Cache-Control': 'no-cache' } };
|
||||||
const response = await fetch(database, options);
|
const url = `${environment.gitea.raw}/database.json`;
|
||||||
const { actions, exclusions, keywords, rules, ...rest } = await response.json();
|
const { rules, ...result } = await (await fetch(url, options)).json();
|
||||||
|
|
||||||
reply.send({
|
reply.send({
|
||||||
data: {
|
data: {
|
||||||
...rest,
|
...result,
|
||||||
actions: actions.map(parseActionName),
|
|
||||||
commonWords: keywords,
|
|
||||||
rules: rules.map(toDeclarativeNetRequestRule),
|
rules: rules.map(toDeclarativeNetRequestRule),
|
||||||
skips: { domains: exclusions.overflows, tags: exclusions.tags },
|
|
||||||
},
|
},
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
@ -40,3 +35,17 @@ export default (server: FastifyInstance, _options: RouteShorthandOptions, done:
|
|||||||
|
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function toDeclarativeNetRequestRule(urlFilter: string, index: number) {
|
||||||
|
return {
|
||||||
|
action: {
|
||||||
|
type: 'block',
|
||||||
|
},
|
||||||
|
condition: {
|
||||||
|
resourceTypes: ['font', 'image', 'media', 'object', 'script', 'stylesheet', 'xmlhttprequest'],
|
||||||
|
urlFilter,
|
||||||
|
},
|
||||||
|
id: index + 1,
|
||||||
|
priority: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
import { FastifyInstance, RouteShorthandOptions } from 'fastify';
|
|
||||||
import fetch from 'node-fetch';
|
|
||||||
import { toDeclarativeNetRequestRule } from 'services/compatibility';
|
|
||||||
import environment from 'services/environment';
|
|
||||||
import { RATE_LIMIT_3_PER_MIN } from 'services/rateLimit';
|
|
||||||
|
|
||||||
export default (server: FastifyInstance, _options: RouteShorthandOptions, done: () => void) => {
|
|
||||||
server.get(
|
|
||||||
'/data/',
|
|
||||||
{
|
|
||||||
config: {
|
|
||||||
rateLimit: RATE_LIMIT_3_PER_MIN,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async (_request, reply) => {
|
|
||||||
try {
|
|
||||||
const database = `${environment.gitea.raw}/database.json`;
|
|
||||||
const options = { headers: { 'Cache-Control': 'no-cache' } };
|
|
||||||
const response = await fetch(database, options);
|
|
||||||
const { rules, ...rest } = await response.json();
|
|
||||||
|
|
||||||
reply.send({
|
|
||||||
data: {
|
|
||||||
...rest,
|
|
||||||
rules: rules.map(toDeclarativeNetRequestRule),
|
|
||||||
},
|
|
||||||
success: true,
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
reply.send({
|
|
||||||
errors: [error.message],
|
|
||||||
success: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
done();
|
|
||||||
};
|
|
@ -1 +0,0 @@
|
|||||||
export { default as default } from '../v5/issues';
|
|
@ -1 +0,0 @@
|
|||||||
export { default as default } from '../v5/report';
|
|
@ -1,32 +1,13 @@
|
|||||||
export function parseAction(action: Action): string {
|
/**
|
||||||
return `${action.domain}##${action.selector}##${action.name}${action.property ? `##${action.property}` : ''}`;
|
* Parse the new fix object into the old string format used by older versions of the extension
|
||||||
|
*/
|
||||||
|
export function parseNewFix(fix: Fix): string {
|
||||||
|
return `${fix.domain}##${fix.selector}##${fix.action}${fix.property ? `##${fix.property}` : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseActionName(
|
export interface Fix {
|
||||||
action: Action
|
readonly action: string;
|
||||||
): Omit<Action, 'name'> & { readonly action: string } {
|
|
||||||
const { name, ...rest } = action;
|
|
||||||
|
|
||||||
return { action: name, ...rest };
|
|
||||||
}
|
|
||||||
|
|
||||||
export function toDeclarativeNetRequestRule(urlFilter: string, index: number) {
|
|
||||||
return {
|
|
||||||
action: {
|
|
||||||
type: 'block',
|
|
||||||
},
|
|
||||||
condition: {
|
|
||||||
resourceTypes: ['font', 'image', 'media', 'object', 'script', 'stylesheet', 'xmlhttprequest'],
|
|
||||||
urlFilter,
|
|
||||||
},
|
|
||||||
id: index + 1,
|
|
||||||
priority: 1,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Action {
|
|
||||||
readonly domain: string;
|
readonly domain: string;
|
||||||
readonly name: string;
|
|
||||||
readonly property?: string;
|
readonly property?: string;
|
||||||
readonly selector: string;
|
readonly selector: string;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Cookie Dialog Monster Mobile",
|
"name": "Cookie Dialog Monster Mobile",
|
||||||
"version": "8.0.2",
|
"version": "8.0.1",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"icons": {
|
"icons": {
|
||||||
@ -28,6 +28,28 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"all_frames": true,
|
"all_frames": true,
|
||||||
|
"exclude_matches": [
|
||||||
|
"*://*.bauhaus.cz/*",
|
||||||
|
"*://*.codesandbox.io/*",
|
||||||
|
"*://*.facebook.com/*",
|
||||||
|
"*://*.googleapis.com/embed/*",
|
||||||
|
"*://*.olympics.com/*",
|
||||||
|
"*://*.youtube-nocookie.com/embed/*",
|
||||||
|
"*://*.youtube.com/embed/*",
|
||||||
|
"*://www.youtube.com/*",
|
||||||
|
"*://translate.google.ca/*",
|
||||||
|
"*://translate.google.co.in/*",
|
||||||
|
"*://translate.google.co.jp/*",
|
||||||
|
"*://translate.google.co.uk/*",
|
||||||
|
"*://translate.google.com.au/*",
|
||||||
|
"*://translate.google.com.br/*",
|
||||||
|
"*://translate.google.com/*",
|
||||||
|
"*://translate.google.de/*",
|
||||||
|
"*://translate.google.es/*",
|
||||||
|
"*://translate.google.fr/*",
|
||||||
|
"*://translate.google.it/*",
|
||||||
|
"*://www.cookie-dialog-monster.com/*"
|
||||||
|
],
|
||||||
"js": ["scripts/content.js"],
|
"js": ["scripts/content.js"],
|
||||||
"matches": ["http://*/*", "https://*/*"],
|
"matches": ["http://*/*", "https://*/*"],
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
|
@ -49,7 +49,7 @@ class RequestManager {
|
|||||||
* @description API URL
|
* @description API URL
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
const apiUrl = 'https://api.cookie-dialog-monster.com/rest/v6';
|
const apiUrl = 'https://api.cookie-dialog-monster.com/rest/v5';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Request manager instance
|
* @description Request manager instance
|
||||||
@ -144,6 +144,34 @@ async function getState(hostname) {
|
|||||||
return { ...stateByDefault, ...state, updateAvailable };
|
return { ...stateByDefault, ...state, updateAvailable };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Format number to avoid errors
|
||||||
|
* @param {number} [value]
|
||||||
|
* @returns {string | null}
|
||||||
|
*/
|
||||||
|
function formatNumber(value) {
|
||||||
|
if (value) {
|
||||||
|
if (value >= 1e6) {
|
||||||
|
return `${Math.floor(value / 1e6)}M`;
|
||||||
|
} else if (value >= 1e3) {
|
||||||
|
return `${Math.floor(value / 1e3)}K`;
|
||||||
|
} else {
|
||||||
|
return value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Convert match string to pattern string
|
||||||
|
* @param {string} match
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function matchToPattern(match) {
|
||||||
|
return `^${match.replaceAll('*.', '*(.)?').replaceAll('*', '.*')}$`;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @async
|
* @async
|
||||||
* @description Refresh data
|
* @description Refresh data
|
||||||
@ -287,10 +315,11 @@ browser.runtime.onMessage.addListener((message, sender, callback) => {
|
|||||||
case 'REPORT':
|
case 'REPORT':
|
||||||
report(message).then(callback);
|
report(message).then(callback);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 'UPDATE_BADGE':
|
case 'UPDATE_BADGE':
|
||||||
if (isPage && tabId !== undefined) {
|
if (isPage && tabId !== undefined) {
|
||||||
browser.action.setBadgeBackgroundColor({ color: '#6b7280' });
|
browser.action.setBadgeBackgroundColor({ color: '#6b7280' });
|
||||||
browser.action.setBadgeText({ tabId, text: message.value ? `${message.value}` : null });
|
browser.action.setBadgeText({ tabId, text: formatNumber(message.value) });
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'UPDATE_STORE':
|
case 'UPDATE_STORE':
|
||||||
@ -306,7 +335,6 @@ browser.runtime.onMessage.addListener((message, sender, callback) => {
|
|||||||
*/
|
*/
|
||||||
browser.runtime.onInstalled.addListener((details) => {
|
browser.runtime.onInstalled.addListener((details) => {
|
||||||
if (details.reason === 'update') {
|
if (details.reason === 'update') {
|
||||||
refreshData();
|
|
||||||
storage.remove('updateAvailable');
|
storage.remove('updateAvailable');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -334,24 +362,27 @@ browser.webRequest.onBeforeRequest.addListener(
|
|||||||
const { tabId, type, url } = details;
|
const { tabId, type, url } = details;
|
||||||
|
|
||||||
if (tabId > -1 && type === 'main_frame') {
|
if (tabId > -1 && type === 'main_frame') {
|
||||||
const { exclusions, rules } = await getData();
|
const manifest = browser.runtime.getManifest();
|
||||||
|
const excludeMatches = manifest.content_scripts[0].exclude_matches;
|
||||||
|
const excludePatterns = excludeMatches.map(matchToPattern);
|
||||||
|
|
||||||
if (exclusions.domains.some((x) => location.hostname.match(x.replaceAll(/\*/g, '[^ ]*')))) {
|
if (excludePatterns.some((pattern) => new RegExp(pattern).test(url))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = await getData();
|
||||||
const hostname = getHostname(url);
|
const hostname = getHostname(url);
|
||||||
const state = await getState(hostname);
|
const state = await getState(hostname);
|
||||||
|
|
||||||
if (rules?.length) {
|
if (data?.rules?.length) {
|
||||||
const rulesWithTabId = rules.map((rule) => ({
|
const rules = data.rules.map((rule) => ({
|
||||||
...rule,
|
...rule,
|
||||||
condition: { ...rule.condition, tabIds: [tabId] },
|
condition: { ...rule.condition, tabIds: [tabId] },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await browser.declarativeNetRequest.updateSessionRules({
|
await browser.declarativeNetRequest.updateSessionRules({
|
||||||
addRules: state.on ? rulesWithTabId : undefined,
|
addRules: state.on ? rules : undefined,
|
||||||
removeRuleIds: rules.map((rule) => rule.id),
|
removeRuleIds: data.rules.map((rule) => rule.id),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -364,10 +395,15 @@ browser.webRequest.onBeforeRequest.addListener(
|
|||||||
*/
|
*/
|
||||||
browser.webRequest.onErrorOccurred.addListener(
|
browser.webRequest.onErrorOccurred.addListener(
|
||||||
async (details) => {
|
async (details) => {
|
||||||
const { error, tabId } = details;
|
const { error, tabId, url } = details;
|
||||||
|
|
||||||
if (error === 'net::ERR_BLOCKED_BY_CLIENT' && tabId > -1) {
|
if (error === 'net::ERR_BLOCKED_BY_CLIENT' && tabId > -1) {
|
||||||
await browser.tabs.sendMessage(tabId, { type: 'INCREASE_ACTIONS_COUNT', value: error });
|
const hostname = getHostname(url);
|
||||||
|
const state = await getState(hostname);
|
||||||
|
|
||||||
|
if (state.on) {
|
||||||
|
await browser.tabs.sendMessage(tabId, { type: 'INCREASE_ACTIONS_COUNT' });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ urls: ['<all_urls>'] }
|
{ urls: ['<all_urls>'] }
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @typedef {Object} Action
|
* @typedef {Object} ExtensionData
|
||||||
* @property {string} domain
|
* @property {string[]} commonWords
|
||||||
* @property {string} name
|
* @property {Fix[]} fixes
|
||||||
* @property {string} [property]
|
* @property {{ domains: string[], tags: string[] }} skips
|
||||||
* @property {string} selector
|
* @property {{ backdrops: string[], classes: string[], containers: string[], selectors: string[] }} tokens
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,24 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ExclusionMap
|
* @typedef {Object} Fix
|
||||||
* @property {string[]} domains
|
* @property {string} action
|
||||||
* @property {string[]} overflows
|
* @property {string} domain
|
||||||
* @property {string[]} tags
|
* @property {string} [property]
|
||||||
*/
|
* @property {string} selector
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} ExtensionData
|
|
||||||
* @property {Action[]} actions
|
|
||||||
* @property {ExclusionMap} exclusions
|
|
||||||
* @property {string[]} keywords
|
|
||||||
* @property {TokenMap} tokens
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} GetElementsParams
|
|
||||||
* @property {boolean} [filterEarly]
|
|
||||||
* @property {HTMLElement} [from]
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,11 +27,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} TokenMap
|
* @typedef {Object} GetElementsParams
|
||||||
* @property {string[]} backdrops
|
* @property {boolean} [filterEarly]
|
||||||
* @property {string[]} classes
|
* @property {HTMLElement} [from]
|
||||||
* @property {string[]} containers
|
|
||||||
* @property {string[]} selectors
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,31 +42,22 @@ if (typeof browser === 'undefined') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Class for request batching
|
* @description Actions done by the extension
|
||||||
|
* @type {Set<string>}
|
||||||
*/
|
*/
|
||||||
class NotifiableSet extends Set {
|
const actions = new Set();
|
||||||
constructor(...args) {
|
|
||||||
super(...args);
|
|
||||||
}
|
|
||||||
|
|
||||||
add(value) {
|
|
||||||
super.add(value);
|
|
||||||
browser.runtime.sendMessage({ type: 'UPDATE_BADGE', value: super.size });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Data object with all the necessary information
|
* @description Data object with all the necessary information
|
||||||
* @type {ExtensionData}
|
* @type {ExtensionData}
|
||||||
*/
|
*/
|
||||||
let { actions, exclusions, keywords, tokens } = {
|
let { commonWords, fixes, skips, tokens } = {
|
||||||
actions: [],
|
commonWords: [],
|
||||||
exclusions: {
|
fixes: [],
|
||||||
|
skips: {
|
||||||
domains: [],
|
domains: [],
|
||||||
overflows: [],
|
|
||||||
tags: [],
|
tags: [],
|
||||||
},
|
},
|
||||||
keywords: [],
|
|
||||||
tokens: {
|
tokens: {
|
||||||
backdrops: [],
|
backdrops: [],
|
||||||
classes: [],
|
classes: [],
|
||||||
@ -104,13 +80,7 @@ const hostname = getHostname();
|
|||||||
* @description Initial visibility state
|
* @description Initial visibility state
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
let initiallyVisible = false;
|
let initiallyVisible = document.visibilityState === 'visible';
|
||||||
|
|
||||||
/**
|
|
||||||
* @description Log of those steps done by the extension
|
|
||||||
* @type {NotifiableSet<string>}
|
|
||||||
*/
|
|
||||||
const log = new NotifiableSet();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Options provided to observer
|
* @description Options provided to observer
|
||||||
@ -126,9 +96,9 @@ const seen = new Set();
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Extension state
|
* @description Extension state
|
||||||
* @type {ContentState | undefined}
|
* @type {ContentState}
|
||||||
*/
|
*/
|
||||||
let state = undefined;
|
let state = { on: true };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Clean DOM
|
* @description Clean DOM
|
||||||
@ -150,7 +120,8 @@ function clean(elements, skipMatch) {
|
|||||||
if (element instanceof HTMLDialogElement) element.close();
|
if (element instanceof HTMLDialogElement) element.close();
|
||||||
hide(element);
|
hide(element);
|
||||||
|
|
||||||
log.add(`${Date.now()}`);
|
actions.add(`${Date.now()}`);
|
||||||
|
dispatch({ type: 'UPDATE_BADGE', value: actions.size });
|
||||||
}
|
}
|
||||||
|
|
||||||
seen.add(element);
|
seen.add(element);
|
||||||
@ -165,11 +136,11 @@ function clean(elements, skipMatch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Check if element contains a keyword
|
* @description Check if element contains a common word
|
||||||
* @param {HTMLElement} element
|
* @param {HTMLElement} element
|
||||||
*/
|
*/
|
||||||
function hasKeyword(element) {
|
function containsCommonWord(element) {
|
||||||
return !!keywords?.length && !!element.outerHTML.match(new RegExp(keywords.join('|')));
|
return !!commonWords.length && !!element.outerHTML.match(new RegExp(commonWords.join('|')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,21 +203,6 @@ function getHostname() {
|
|||||||
return hostname.split('.').slice(-3).join('.').replace('www.', '');
|
return hostname.split('.').slice(-3).join('.').replace('www.', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @async
|
|
||||||
* @description Run if the page wasn't visited yet
|
|
||||||
* @param {Object} message
|
|
||||||
* @returns {Promise<void>}
|
|
||||||
*/
|
|
||||||
function handleRuntimeMessage(message) {
|
|
||||||
switch (message.type) {
|
|
||||||
case 'INCREASE_ACTIONS_COUNT': {
|
|
||||||
log.add(message.value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Check if an element is visible in the viewport
|
* @description Check if an element is visible in the viewport
|
||||||
* @param {HTMLElement} element
|
* @param {HTMLElement} element
|
||||||
@ -273,7 +229,7 @@ function isInViewport(element) {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function match(element, skipMatch) {
|
function match(element, skipMatch) {
|
||||||
if (!exclusions.tags.length || !tokens.selectors.length) {
|
if (!tokens.selectors.length || !skips.tags.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,7 +243,7 @@ function match(element, skipMatch) {
|
|||||||
|
|
||||||
const tagName = element.tagName.toUpperCase();
|
const tagName = element.tagName.toUpperCase();
|
||||||
|
|
||||||
if (exclusions.tags.includes(tagName)) {
|
if (skips.tags.includes(tagName)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +283,7 @@ function filterNodeEarly(node, stopRecursion) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasKeyword(node) && !stopRecursion) {
|
if (commonWords && containsCommonWord(node) && !stopRecursion) {
|
||||||
return [node, ...[...node.children].flatMap((node) => filterNodeEarly(node, true))];
|
return [node, ...[...node.children].flatMap((node) => filterNodeEarly(node, true))];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,27 +291,46 @@ function filterNodeEarly(node, stopRecursion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Fix specific cases
|
* @description Fix data, middle consent page and scroll issues
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function fix() {
|
function fix() {
|
||||||
for (const action of actions) {
|
const backdrops = getElements(tokens.backdrops);
|
||||||
const { domain, name, property, selector } = action;
|
const domains = skips.domains.map((x) => (x.split('.').length < 3 ? `*${x}` : x));
|
||||||
|
|
||||||
if (hostname.match(domain.replaceAll(/\*/g, '[^ ]*'))) {
|
for (const backdrop of backdrops) {
|
||||||
switch (name) {
|
if (backdrop.children.length === 0 && !seen.has(backdrop)) {
|
||||||
|
actions.add(`${Date.now()}`);
|
||||||
|
seen.add(backdrop);
|
||||||
|
hide(backdrop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (domains.every((x) => !hostname.match(x.replaceAll(/\*/g, '[^ ]*')))) {
|
||||||
|
for (const element of [document.body, document.documentElement]) {
|
||||||
|
element?.classList.remove(...(tokens.classes ?? []));
|
||||||
|
element?.style.setProperty('position', 'initial', 'important');
|
||||||
|
element?.style.setProperty('overflow-y', 'initial', 'important');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const fix of fixes) {
|
||||||
|
const { action, domain, property, selector } = fix;
|
||||||
|
|
||||||
|
if (hostname.includes(domain)) {
|
||||||
|
switch (action) {
|
||||||
case 'click': {
|
case 'click': {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
||||||
|
actions.add('click');
|
||||||
element?.click();
|
element?.click();
|
||||||
log.add(name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'remove': {
|
case 'remove': {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
||||||
|
actions.add('remove');
|
||||||
element?.style?.removeProperty(property);
|
element?.style?.removeProperty(property);
|
||||||
log.add(name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'reload': {
|
case 'reload': {
|
||||||
@ -365,56 +340,38 @@ function fix() {
|
|||||||
case 'reset': {
|
case 'reset': {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
||||||
|
actions.add('reset');
|
||||||
element?.style?.setProperty(property, 'initial', 'important');
|
element?.style?.setProperty(property, 'initial', 'important');
|
||||||
log.add(name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'resetAll': {
|
case 'resetAll': {
|
||||||
const elements = getElements(selector);
|
const elements = getElements(selector);
|
||||||
|
|
||||||
|
actions.add('resetAll');
|
||||||
elements.forEach((e) => e?.style?.setProperty(property, 'initial', 'important'));
|
elements.forEach((e) => e?.style?.setProperty(property, 'initial', 'important'));
|
||||||
log.add(name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const backdrops = getElements(tokens.backdrops);
|
|
||||||
|
|
||||||
for (const backdrop of backdrops) {
|
|
||||||
if (backdrop.children.length === 0 && !seen.has(backdrop)) {
|
|
||||||
log.add(`${Date.now()}`);
|
|
||||||
seen.add(backdrop);
|
|
||||||
hide(backdrop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const skips = exclusions.overflows.map((x) => (x.split('.').length < 3 ? `*${x}` : x));
|
|
||||||
|
|
||||||
if (!skips.some((x) => hostname.match(x.replaceAll(/\*/g, '[^ ]*')))) {
|
|
||||||
for (const element of [document.body, document.documentElement]) {
|
|
||||||
element?.classList.remove(...(tokens.classes ?? []));
|
|
||||||
element?.style.setProperty('position', 'initial', 'important');
|
|
||||||
element?.style.setProperty('overflow-y', 'initial', 'important');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ionRouterOutlet = document.getElementsByTagName('ion-router-outlet')[0];
|
const ionRouterOutlet = document.getElementsByTagName('ion-router-outlet')[0];
|
||||||
|
|
||||||
if (ionRouterOutlet) {
|
if (ionRouterOutlet) {
|
||||||
|
actions.add('ion-router-outlet');
|
||||||
// 2024-08-02: fix #644 temporarily
|
// 2024-08-02: fix #644 temporarily
|
||||||
ionRouterOutlet.removeAttribute('inert');
|
ionRouterOutlet.removeAttribute('inert');
|
||||||
log.add('ion-router-outlet');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const t4Wrapper = document.getElementsByClassName('t4-wrapper')[0];
|
const t4Wrapper = document.getElementsByClassName('t4-wrapper')[0];
|
||||||
|
|
||||||
if (t4Wrapper) {
|
if (t4Wrapper) {
|
||||||
log.add('t4-wrapper');
|
actions.add('t4-wrapper');
|
||||||
// 2024-09-12: fix #945 temporarily
|
// 2024-09-12: fix #945 temporarily
|
||||||
t4Wrapper.removeAttribute('inert');
|
t4Wrapper.removeAttribute('inert');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch({ type: 'UPDATE_BADGE', value: actions.size });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -455,48 +412,41 @@ function run(params = {}) {
|
|||||||
* @async
|
* @async
|
||||||
* @description Set up the extension
|
* @description Set up the extension
|
||||||
* @param {SetUpParams} [params]
|
* @param {SetUpParams} [params]
|
||||||
* @returns {Promise<void>}
|
|
||||||
*/
|
*/
|
||||||
async function setUp(params = {}) {
|
async function setUp(params = {}) {
|
||||||
const data = await dispatch({ hostname, type: 'GET_DATA' });
|
|
||||||
|
|
||||||
exclusions = data?.exclusions ?? exclusions;
|
|
||||||
|
|
||||||
if (exclusions.domains.some((x) => location.hostname.match(x.replaceAll(/\*/g, '[^ ]*')))) {
|
|
||||||
dispatch({ type: 'DISABLE_ICON' });
|
|
||||||
observer.disconnect();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
state = await dispatch({ hostname, type: 'GET_STATE' });
|
state = await dispatch({ hostname, type: 'GET_STATE' });
|
||||||
dispatch({ type: 'ENABLE_POPUP' });
|
dispatch({ type: 'ENABLE_POPUP' });
|
||||||
dispatch({ type: 'ENABLE_REPORT' });
|
|
||||||
|
|
||||||
if (state.on) {
|
if (state.on) {
|
||||||
browser.runtime.onMessage.addListener(handleRuntimeMessage);
|
const data = await dispatch({ hostname, type: 'GET_DATA' });
|
||||||
dispatch({ hostname, type: 'ENABLE_ICON' });
|
|
||||||
|
|
||||||
actions = data?.actions ?? actions;
|
commonWords = data?.commonWords ?? commonWords;
|
||||||
keywords = data?.keywords ?? keywords;
|
fixes = data?.fixes ?? fixes;
|
||||||
|
skips = data?.skips ?? skips;
|
||||||
tokens = data?.tokens ?? tokens;
|
tokens = data?.tokens ?? tokens;
|
||||||
|
|
||||||
|
dispatch({ type: 'ENABLE_REPORT' });
|
||||||
|
dispatch({ hostname, type: 'ENABLE_ICON' });
|
||||||
|
dispatch({ type: 'UPDATE_BADGE', value: actions.size });
|
||||||
observer.observe(document.body ?? document.documentElement, options);
|
observer.observe(document.body ?? document.documentElement, options);
|
||||||
if (!params.skipRunFn) run({ containers: tokens.containers });
|
if (!params.skipRunFn) run({ containers: tokens.containers });
|
||||||
|
} else {
|
||||||
|
dispatch({ type: 'DISABLE_REPORT' });
|
||||||
|
dispatch({ type: 'DISABLE_ICON' });
|
||||||
|
dispatch({ type: 'UPDATE_BADGE', value: actions.size });
|
||||||
|
observer.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Wait for the body to exist
|
* @description Wait for the body to exist
|
||||||
* @returns {Promise<void>}
|
* @param {void} callback
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
async function setUpAfterWaitForBody() {
|
async function setUpAfterWaitForBody() {
|
||||||
if (document.visibilityState === 'visible' && !initiallyVisible) {
|
|
||||||
if (document.body) {
|
if (document.body) {
|
||||||
initiallyVisible = true;
|
|
||||||
await setUp();
|
await setUp();
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(setUpAfterWaitForBody, 50);
|
setTimeout(setUpAfterWaitForBody, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -516,6 +466,50 @@ const observer = new MutationObserver((mutations) => {
|
|||||||
run({ elements });
|
run({ elements });
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', setUpAfterWaitForBody);
|
/**
|
||||||
window.addEventListener('pageshow', setUpAfterWaitForBody);
|
* @description Listen to messages from any other scripts
|
||||||
setUpAfterWaitForBody();
|
* @listens browser.runtime#onMessage
|
||||||
|
*/
|
||||||
|
browser.runtime.onMessage.addListener(async (message) => {
|
||||||
|
switch (message.type) {
|
||||||
|
case 'INCREASE_ACTIONS_COUNT': {
|
||||||
|
actions.add(`${Date.now()}`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Fix bfcache issues
|
||||||
|
* @listens window#pageshow
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
window.addEventListener('pageshow', async (event) => {
|
||||||
|
if (document.visibilityState === 'visible' && event.persisted) {
|
||||||
|
await setUp();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @async
|
||||||
|
* @description Run if the page wasn't visited yet
|
||||||
|
* @listens window#visibilitychange
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
window.addEventListener('visibilitychange', async () => {
|
||||||
|
if (document.visibilityState === 'visible') {
|
||||||
|
if (!initiallyVisible) {
|
||||||
|
initiallyVisible = true;
|
||||||
|
await setUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch({ type: state.on ? 'ENABLE_REPORT' : 'DISABLE_REPORT' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Run as soon as possible, if the user is in front of the page
|
||||||
|
*/
|
||||||
|
if (document.visibilityState === 'visible') {
|
||||||
|
setUpAfterWaitForBody();
|
||||||
|
}
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
{
|
{
|
||||||
"version": "7.3.2",
|
"version": "7.3.2",
|
||||||
"update_link": "https://www.cookie-dialog-monster.com/releases/7.3.2-mozilla-mobile.xpi"
|
"update_link": "https://www.cookie-dialog-monster.com/releases/7.3.2-mozilla-mobile.xpi"
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "8.0.1",
|
|
||||||
"update_link": "https://www.cookie-dialog-monster.com/releases/8.0.1-mozilla-mobile.xpi"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user