diff --git a/.gitignore b/.gitignore index 3d508ee..f5bea76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ +_metadata/ +!.yarn/plugins +!.yarn/releases .DS_Store +.env .pnp.* .yarn/* -!.yarn/releases -!.yarn/plugins -build -node_modules -.env +build/ +node_modules/ diff --git a/.prettierignore b/.prettierignore index ce6654d..b7f3b84 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ package.json -.yarnrc.yml \ No newline at end of file +.yarnrc.yml diff --git a/data/tokens.json b/data/tokens.json index 4736b57..b14b978 100644 --- a/data/tokens.json +++ b/data/tokens.json @@ -672,6 +672,7 @@ ".c-simple-cookie-consent", ".c-unique_cookie-attention", ".c09--cookie", + ".c1yxs.c1yxs-mod-visible.c1yxs-mod-z-index-top", ".c24-cookie-consent-wrapper", ".c24-cookie", ".c2g_daimler_cookie_dialog_overlay", @@ -3619,6 +3620,7 @@ ".GlobalConsentBar", ".globalcookiepolicycontainer", ".globalPrivacyBar", + ".glue-cookie-notification-bar", ".gmt_gdpr", ".gn-cookie-alert", ".gn-cookies-warning", @@ -5674,7 +5676,6 @@ "[aria-label=\"Before you continue to Google Search\"]", "[aria-label=\"Cookie consent\"]", "[aria-label=\"cookieconsent\"]", - "[aria-label=\"cookieconsent\"]", "[aria-label=\"cookies\"]", "[aria-label=\"open cookies\"]", "[aria-labelledby=\"cookie_banner_title\"]", @@ -5847,6 +5848,7 @@ "[data-react-class=\"CookieNotice\"]", "[data-react-class=\"EUCookieBanner\"]", "[data-role=\"cookie-policy-banner\"]", + "[data-role=\"gdpr-cookie-container\"]", "[data-section-type=\"CookiesBanner\"]", "[data-selector=\"container@cookiebar\"]", "[data-selector=\"cookie-policy\"]", @@ -5929,7 +5931,6 @@ "[style=\"background:#eed;padding:10px;margin:0;text-align:center;border-bottom:1px solid #446\"]", "[style=\"bottom: 0px;\"]", "[style=\"bottom: 24px; position: fixed; left: 0px; width: 100%; display: flex; z-index: 1000000; opacity: 1;\"]", - "[style=\"bottom: 24px; position: fixed; left: 0px; width: 100%; display: flex; z-index: 1000000; opacity: 1;\"]", "[style=\"opacity: 1; x: 1px; y: 0px; transform: translateY(0px) scale(1, 1); --Toaster-indicatorColor:#24A0ED;\"]", "[style=\"overflow: hidden; position: absolute; top: 0px; width: 379px; z-index: 991; height: 180px; margin-top: 70px; right: 0px; margin-right: 25px;\"]", "[style=\"position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 999; background-color: rgba(0, 0, 0, 0.3);\"]", @@ -6862,6 +6863,7 @@ "#cmsCookieWarning", "#cmsInfoCk", "#cmsplus_cookies", + "#cn_banner_form_alta_footer + div:has([data-testid=\"modal\"])", "#cn-cookie", "#cnContainer", "#cnd-gdpr-container", @@ -7667,7 +7669,6 @@ "#cookie-informations", "#cookie-informer", "#cookie-inner-wrapper", - "#cookie-inner-wrapper", "#cookie-jar-policy-banner", "#cookie-jar", "#cookie-kontrol", @@ -8509,7 +8510,6 @@ "#cookieMessagelightbox", "#cookieMessageModul", "#cookieMessageOuter", - "#cookieMessageOuter", "#cookieMessagesContainer", "#cookieMessageWrapper", "#CookieMessaging", @@ -10521,6 +10521,7 @@ "#globalCookies", "#globalmessage", "#glow-cookies-wrapper", + "#glue-cookie-notification-bar-1", "#gm-cookies", "#GMI_Privacy_Policy", "#gn-cookie-accept", @@ -12686,7 +12687,6 @@ "#wt-confirm-layer", "#wt-cookie-bar", "#wt-cookie-box", - "#wt-modal-container", "#WTCookieDiv", "#wucAcceptCookies_panAcceptCookies", "#wvc-privacy-policy-message-content", diff --git a/packages/browser-extension/src/_locales/pl/messages.json b/packages/browser-extension/src/_locales/pl/messages.json new file mode 100644 index 0000000..8671c29 --- /dev/null +++ b/packages/browser-extension/src/_locales/pl/messages.json @@ -0,0 +1,71 @@ +{ + "appDesc": { + "message": "Czy ktoś wspomniał o okienkach ze zgodą na ciasteczka? 😋" + }, + "contextMenu_issueOption": { + "message": "Śledź to zgłoszenie na GitHubie" + }, + "contextMenu_reportOption": { + "message": "Zgłoś tę stronę" + }, + "contextMenu_settingsOption": { + "message": "Zarządzaj listą wyjątków" + }, + "options_addButton": { + "message": "Dodaj wyjątek" + }, + "options_addPrompt": { + "message": "Wprowadź domenę" + }, + "options_clearButton": { + "message": "Wyczyść listę" + }, + "options_exclusionListTitle": { + "message": "Lista wyjątków" + }, + "options_exportButton": { + "message": "Wyeksportuj listę" + }, + "options_filterPlaceholder": { + "message": "Po wpisaniu naciśnij ENTER, aby filtrować" + }, + "options_importButton": { + "message": "Zaimportuj listę" + }, + "popup_contributeOption": { + "message": "Weź udział w rozwoju projektu" + }, + "popup_helpOption": { + "message": "Potrzebujesz pomocy lub masz problem?" + }, + "popup_rateOption": { + "message": "Oceń to rozszerzenie" + }, + "reportDialog_blankPageOption": { + "message": "Strona jest pusta" + }, + "reportDialog_bodyText": { + "message": "Wybierz rodzaj poniżej" + }, + "reportDialog_cannotClickOption": { + "message": "Nie da się nic kliknąć" + }, + "reportDialog_laggyPageOption": { + "message": "Strona działa wolno" + }, + "reportDialog_pageNotRespondingOption": { + "message": "Strona nie odpowiada" + }, + "reportDialog_pageVisualGlitchOption": { + "message": "Strona zawiera błędy w wyglądzie" + }, + "reportDialog_popupShowUpOption": { + "message": "Pojawiło się okienko" + }, + "reportDialog_submitExtraText": { + "message": "Podczas gdy pracujemy nad rozwiązaniem problemu, możesz dodać tę witrynę do listy wyjątków w ustawieniach rozszerzenia, albo po prostu wyłączyć rozszerzenie dla tej witryny klikając ikonę rozszerzenia na pasku narzędzi przeglądarki." + }, + "reportDialog_submitText": { + "message": "Zgłoszenie zostało wysłane!" + } +} diff --git a/packages/browser-extension/src/manifest.json b/packages/browser-extension/src/manifest.json index 59c049b..41a219f 100644 --- a/packages/browser-extension/src/manifest.json +++ b/packages/browser-extension/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Cookie Dialog Monster", - "version": "7.0.3", + "version": "7.0.4", "default_locale": "en", "description": "__MSG_appDesc__", "icons": { @@ -52,8 +52,17 @@ "run_at": "document_start" } ], + "declarative_net_request": { + "rule_resources": [ + { + "enabled": true, + "id": "ruleset", + "path": "rules.json" + } + ] + }, "host_permissions": ["http://*/*", "https://*/*"], - "permissions": ["contextMenus", "scripting", "storage"], + "permissions": ["contextMenus", "declarativeNetRequest", "scripting", "storage"], "web_accessible_resources": [ { "matches": ["http://*/*", "https://*/*"], diff --git a/packages/browser-extension/src/rules.json b/packages/browser-extension/src/rules.json new file mode 100644 index 0000000..023fa92 --- /dev/null +++ b/packages/browser-extension/src/rules.json @@ -0,0 +1,13 @@ +[ + { + "id": 1, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "urlFilter": "||cmp.inmobi.com^", + "resourceTypes": ["script"] + } + } +] diff --git a/packages/browser-extension/src/scripts/content.js b/packages/browser-extension/src/scripts/content.js index 43ccf82..e8132e3 100644 --- a/packages/browser-extension/src/scripts/content.js +++ b/packages/browser-extension/src/scripts/content.js @@ -324,6 +324,10 @@ async function setup(skipReadyStateHack) { skips = data?.skips; tokens = data?.tokens; + if (count > 0) { + dispatch({ type: 'SET_BADGE', value: `${count}` }); + } + // 2023-06-13: hack to force clean when data request takes too long and there are no changes later if (document.readyState === 'complete' && !skipReadyStateHack) { window.dispatchEvent(new Event(setupEventName)); @@ -402,6 +406,7 @@ window.addEventListener('load', () => { */ window.addEventListener('pageshow', (event) => { if (document.visibilityState === 'visible' && event.persisted) { + setup(true); window.dispatchEvent(new Event(setupEventName)); } });