diff --git a/src/js/exports.js b/src/js/exports.js index 45acb4a..79919d0 100644 --- a/src/js/exports.js +++ b/src/js/exports.js @@ -20,7 +20,10 @@ export async function injectTab({ // Extract tabIds from all highlighted tabs const tabIds = [] - const tabs = await chrome.tabs.query({ highlighted: true }) + const tabs = await chrome.tabs.query({ + currentWindow: true, + highlighted: true, + }) if (!tabs.length) { const [tab] = await chrome.tabs.query({ currentWindow: true, diff --git a/src/js/popup.js b/src/js/popup.js index f61760b..3312829 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -70,7 +70,7 @@ async function initPopup() { } async function processFileTypes(hasPerms) { - const [tab] = await chrome.tabs.query({ active: true }) + const [tab] = await chrome.tabs.query({ currentWindow: true, active: true }) console.debug('tab:', tab) const url = new URL(tab.url) // console.debug('url:', url)