diff --git a/background.js b/background.js index e69de29..9fa68db 100644 --- a/background.js +++ b/background.js @@ -0,0 +1,4 @@ +chrome.runtime.onInstalled.addListener(() => { + console.log("Reject Cookies extension installed."); + }); + \ No newline at end of file diff --git a/content.js b/content.js index 060eaaa..5510aaa 100644 --- a/content.js +++ b/content.js @@ -3,8 +3,6 @@ chrome.storage.sync.get('selectors', (data) => { 'button[aria-label="reject"]', 'button[data-testid="reject"]', 'button[class*="reject"]' - - // Add selectors as needed ]; function clickButton(selector) { diff --git a/icon128.png b/images/icon128.png similarity index 100% rename from icon128.png rename to images/icon128.png diff --git a/icon16.png b/images/icon16.png similarity index 100% rename from icon16.png rename to images/icon16.png diff --git a/icon48.png b/images/icon48.png similarity index 100% rename from icon48.png rename to images/icon48.png diff --git a/manifest.json b/manifest.json index 456f0de..fe3c5ce 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "Reject Cookies", "version": "1.0", "description": "Automatically reject all cookie popups.", - "permissions": ["activeTab", "scripting"], + "permissions": ["activeTab", "storage", "scripting"], "background": { "service_worker": "background.js" }, @@ -13,6 +13,14 @@ "js": ["content.js"], "run_at": "document_end" } - ] + ], + "action": { + "default_popup": "popup.html", + "default_icon": { + "16": "images/icon16.png", + "48": "images/icon48.png", + "128": "images/icon128.png" + } + } } \ No newline at end of file diff --git a/popup.html b/popup.html index 5214f4d..77e727f 100644 --- a/popup.html +++ b/popup.html @@ -3,19 +3,75 @@
Enter selectors to reject cookies, one per line:
+
+ Enter CSS selectors for cookie rejection buttons. One per line.
+
For example: button[aria-label="reject"]
+