Skip to content

Commit 2df2049

Browse files
committed
Changed toolbar icon click to open new tab ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/you.com-omnibox]
1 parent 4d0747c commit 2df2049

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

chromium/extension/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const youURL = 'https://you.com/'
1313
chrome.action.onClicked.addListener(async () => {
1414
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true }),
1515
query = activeTab.url ? new URL(activeTab.url).searchParams.get('q') || 'hi' : 'hi'
16-
chrome.tabs.update(activeTab.id, { url: `${youURL}/search?q=${query}&tbm=youchat` })
16+
chrome.tabs.create({ url: `${youURL}/search?q=${query}&tbm=youchat` })
1717
})
1818

1919
// Suggest You.com on short prefix used

firefox/extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const youURL = 'https://you.com/'
1313
chrome.action.onClicked.addListener(async () => {
1414
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true }),
1515
query = activeTab.url ? new URL(activeTab.url).searchParams.get('q') || 'hi' : 'hi'
16-
chrome.tabs.update(activeTab.id, { url: `${youURL}/search?q=${query}&tbm=youchat` })
16+
chrome.tabs.create({ url: `${youURL}/search?q=${query}&tbm=youchat` })
1717
})
1818

1919
// Suggest You.com on short prefix used

0 commit comments

Comments
 (0)