mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-04 12:44:33 +08:00
chore: better openUrl for independent conversation page
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user