diff --git a/src/manifest.json b/src/manifest.json index 29e93d8..8b3d3e9 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -18,7 +18,8 @@ "cookies", "storage", "contextMenus", - "unlimitedStorage" + "unlimitedStorage", + "tabs" ], "background": { "service_worker": "background.js" diff --git a/src/manifest.v2.json b/src/manifest.v2.json index ef4005b..500178f 100644 --- a/src/manifest.v2.json +++ b/src/manifest.v2.json @@ -15,6 +15,7 @@ "storage", "contextMenus", "unlimitedStorage", + "tabs", "https://*.openai.com/", "https://*.bing.com/" ], diff --git a/src/utils/open-url.mjs b/src/utils/open-url.mjs index 4e4d257..86eac74 100644 --- a/src/utils/open-url.mjs +++ b/src/utils/open-url.mjs @@ -1,7 +1,7 @@ import Browser from 'webextension-polyfill' export function openUrl(url) { - Browser.tabs.query({ url }).then((tabs) => { + Browser.tabs.query({ url, currentWindow: true }).then((tabs) => { if (tabs.length > 0) { Browser.tabs.update(tabs[0].id, { active: true }) } else {