Skip to content

Commit 8e4d89c

Browse files
committed
chore: better openUrl for independent conversation page
1 parent 07c41b2 commit 8e4d89c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"cookies",
1919
"storage",
2020
"contextMenus",
21-
"unlimitedStorage"
21+
"unlimitedStorage",
22+
"tabs"
2223
],
2324
"background": {
2425
"service_worker": "background.js"

src/manifest.v2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"storage",
1616
"contextMenus",
1717
"unlimitedStorage",
18+
"tabs",
1819
"https://*.openai.com/",
1920
"https://*.bing.com/"
2021
],

src/utils/open-url.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Browser from 'webextension-polyfill'
22

33
export function openUrl(url) {
4-
Browser.tabs.query({ url }).then((tabs) => {
4+
Browser.tabs.query({ url, currentWindow: true }).then((tabs) => {
55
if (tabs.length > 0) {
66
Browser.tabs.update(tabs[0].id, { active: true })
77
} else {

0 commit comments

Comments
 (0)