From f1551c56eaa7132891d153c308aac5ccf2f57b8f Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 6 Jul 2025 19:06:19 -0400 Subject: [PATCH] [mv3] Add ability to assign a shortcut to "Create a custom filter" --- platform/mv3/chromium/manifest.json | 3 +++ platform/mv3/extension/js/background.js | 8 ++++++++ platform/mv3/firefox/manifest.json | 3 +++ platform/mv3/safari/manifest.json | 3 +++ 4 files changed, 17 insertions(+) diff --git a/platform/mv3/chromium/manifest.json b/platform/mv3/chromium/manifest.json index 2984baabc..8c21e531a 100644 --- a/platform/mv3/chromium/manifest.json +++ b/platform/mv3/chromium/manifest.json @@ -15,6 +15,9 @@ "commands": { "enter-zapper-mode": { "description": "__MSG_zapperTipEnter__" + }, + "enter-picker-mode": { + "description": "__MSG_pickerTipEnter__" } }, "declarative_net_request": { diff --git a/platform/mv3/extension/js/background.js b/platform/mv3/extension/js/background.js index 57e25b2ec..ed1e68a7e 100644 --- a/platform/mv3/extension/js/background.js +++ b/platform/mv3/extension/js/background.js @@ -489,6 +489,14 @@ function onCommand(command, tab) { }); break; } + case 'enter-picker-mode': { + if ( browser.scripting === undefined ) { return; } + browser.scripting.executeScript({ + files: [ '/js/scripting/tool-overlay.js', '/js/scripting/picker.js' ], + target: { tabId: tab.id }, + }); + break; + } default: break; } diff --git a/platform/mv3/firefox/manifest.json b/platform/mv3/firefox/manifest.json index c4a9cc1c4..444b3f520 100644 --- a/platform/mv3/firefox/manifest.json +++ b/platform/mv3/firefox/manifest.json @@ -25,6 +25,9 @@ "commands": { "enter-zapper-mode": { "description": "__MSG_zapperTipEnter__" + }, + "enter-picker-mode": { + "description": "__MSG_pickerTipEnter__" } }, "declarative_net_request": { diff --git a/platform/mv3/safari/manifest.json b/platform/mv3/safari/manifest.json index 9fe5b3aaf..667e28090 100644 --- a/platform/mv3/safari/manifest.json +++ b/platform/mv3/safari/manifest.json @@ -17,6 +17,9 @@ "commands": { "enter-zapper-mode": { "description": "__MSG_zapperTipEnter__" + }, + "enter-picker-mode": { + "description": "__MSG_pickerTipEnter__" } }, "declarative_net_request": {