From f5a68eaa1a04b5fe1fd1be3870f4b9e433bc84a4 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 17 Mar 2024 16:08:50 +0800 Subject: [PATCH] upgrade to manifest V3 - add localizations - fix permissions Unfortunately, manifest V3 isn't as explicit compared to manifest V2. That's what I dislike, especially as it gives less power to UBO. --- manifest.json | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/manifest.json b/manifest.json index 380b9f5..e1360de 100644 --- a/manifest.json +++ b/manifest.json @@ -1,19 +1,29 @@ { - "background": { - "scripts": [ "shopAI.js" ] - }, - "browser_action": { + "manifest_version": 3, + "name": "__MSG_manifest_name__", + "description": "__MSG_manifest_description__", + "version": "0", + + "permissions": [ "tabs", "activeTab", "storage"], + + "action": { "default_icon": "gui/icons/logo_no_tiny.png", "default_popup": "gui/popup.htm" - }, - "description": "Shop wisely with AI!", - "icons": { - "1024": "gui/icons/logo.png", - "512": "gui/icons/logo_tiny.png" - }, - "manifest_version": 2, - "name": "ShopAI", - "options_page": "gui/popup.htm", - "permissions": [ "tabs", "webRequest", "webRequestBlocking", "*://*/*" ], - "version": "1" + }, + + "content_scripts": [ + { + "matches": ["http://*/*", "https://*/*"], + "js": ["shopAI.js"] + } + ], + + "icons": { + "1024": "gui/icons/logo.png", + "512": "gui/icons/logo_tiny.png" + }, + + "options_page": "gui/popup.htm", + + "default_locale": "en" }