From 02abdd1d40aa2efee1eaebe7190cfa90c721fca4 Mon Sep 17 00:00:00 2001 From: "YUKI \"Piro\" Hiroshi" Date: Fri, 17 May 2024 14:14:19 +0900 Subject: [PATCH] Use given tab information available on Firefox 126 and later --- webextensions/background/handle-misc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webextensions/background/handle-misc.js b/webextensions/background/handle-misc.js index 822e91068..685aaec7b 100644 --- a/webextensions/background/handle-misc.js +++ b/webextensions/background/handle-misc.js @@ -104,7 +104,7 @@ async function onShortcutCommand(command) { if (mInitializationPhase < PHASE_BACKGROUND_INITIALIZED) return; - let activeTabs = await browser.tabs.query({ + let activeTabs = command.tab ? [command.tab] : await browser.tabs.query({ active: true, currentWindow: true, }).catch(ApiTabs.createErrorHandler());