We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
openUrl
1 parent 07c41b2 commit 8e4d89cCopy full SHA for 8e4d89c
src/manifest.json
@@ -18,7 +18,8 @@
18
"cookies",
19
"storage",
20
"contextMenus",
21
- "unlimitedStorage"
+ "unlimitedStorage",
22
+ "tabs"
23
],
24
"background": {
25
"service_worker": "background.js"
src/manifest.v2.json
@@ -15,6 +15,7 @@
15
16
17
"unlimitedStorage",
+ "tabs",
"https://*.openai.com/",
"https://*.bing.com/"
src/utils/open-url.mjs
@@ -1,7 +1,7 @@
1
import Browser from 'webextension-polyfill'
2
3
export function openUrl(url) {
4
- Browser.tabs.query({ url }).then((tabs) => {
+ Browser.tabs.query({ url, currentWindow: true }).then((tabs) => {
5
if (tabs.length > 0) {
6
Browser.tabs.update(tabs[0].id, { active: true })
7
} else {
0 commit comments