diff --git a/manifest.json b/manifest.json index b8ece86..acf7503 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Do Not Consent", - "version": "4.1.2", + "version": "4.2.0", "default_locale": "en", "description": "__MSG_appDesc__", "icons": { diff --git a/scripts/background.js b/scripts/background.js index 05363d9..cf721ed 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -204,7 +204,7 @@ const updateState = (tabId, state) => { }; /** - * @description Listens to content messages + * @description Listens to messages */ chrome.runtime.onMessage.addListener((request, sender, responseCallback) => { @@ -252,3 +252,13 @@ chrome.runtime.onMessage.addListener((request, sender, responseCallback) => { return true; }); + +/** + * @description Listens to updates + */ + +chrome.runtime.onInstalled.addListener(({ reason }) => { + if (reason === chrome.runtime.OnInstalledReason.UPDATE) { + chrome.storage.local.clear(); + } +}); diff --git a/styles/content.css b/styles/content.css index 7112b79..036a83d 100644 --- a/styles/content.css +++ b/styles/content.css @@ -1,5 +1,5 @@ body { - display: none !important; + opacity: 0; } @media (prefers-color-scheme: dark) {