From a2e00299c3b307b11a88dfd18319fb35c85841dd Mon Sep 17 00:00:00 2001 From: Robert Wiggins Date: Sat, 2 Aug 2025 08:16:26 +0100 Subject: [PATCH] Update extension to Manifest V3 for Chrome Web Store compliance - Update manifest_version from 2 to 3 - Replace browser_action with action - Convert background script to service worker - Update chrome.browserAction API calls to chrome.action - Move broad permissions to host_permissions for better security - Add all required icon sizes (16, 32, 48, 96, 128) - Add activeTab permission for enhanced security These changes ensure the extension meets current Chrome Web Store requirements and will pass the review process for new submissions. --- background-script.js | 4 ++-- manifest.json | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/background-script.js b/background-script.js index 2fb6884..bdc8c82 100644 --- a/background-script.js +++ b/background-script.js @@ -26,7 +26,7 @@ function get_ios_id(uri) { } function update_color() { - chrome.browserAction.setIcon({ path: "res/images/FF_ext_icon_" + color + ".svg" }); + chrome.action.setIcon({ path: "res/images/FF_ext_icon_" + color + ".svg" }); } function getTab() { @@ -87,7 +87,7 @@ function get_domain_info(urlStr) { color = "orange" } - chrome.browserAction.setIcon({ path: "res/images/FF_ext_icon_" + color + ".svg" }); + chrome.action.setIcon({ path: "res/images/FF_ext_icon_" + color + ".svg" }); return { programs: programs, security_txt: security_txt, color: color, last_programs_update: CACHE.last_programs_update, lax: lax } } diff --git a/manifest.json b/manifest.json index ea1a526..5261132 100644 --- a/manifest.json +++ b/manifest.json @@ -1,30 +1,43 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "YesWeHack VDP Finder", "version": "1.1.2", "description": "This extension tells if visited sites have vulnerability disclosure programs", "homepage_url": "https://github.com/yeswehack/yeswehack_vdp_finder", "icons": { + "16": "res/images/icon-48.png", + "32": "res/images/icon-48.png", "48": "res/images/FF_ext_icon_red-48.png", - "96": "res/images/FF_ext_icon_red-96.png" + "96": "res/images/FF_ext_icon_red-96.png", + "128": "res/images/FF_ext_icon_red-128.png" }, - "browser_action": { + "action": { "default_title": "YesWeHack VDP Finder", "default_popup": "popup.html", "default_icon": { + "16": "res/images/icon-48.png", + "32": "res/images/icon-48.png", "48": "res/images/FF_ext_icon_gray-48.png", - "96": "res/images/FF_ext_icon_gray-96.png" + "96": "res/images/FF_ext_icon_gray-96.png", + "128": "res/images/FF_ext_icon_red-128.png" } }, "background": { - "scripts": ["background-script.js"] + "service_worker": "background-script.js" }, "permissions": [ "tabs", - "" + "activeTab" + ], + + "host_permissions": [ + "https://firebounty.com/*", + "https://publicsuffix.org/*", + "https://*/*", + "http://*/*" ] }