Skip to content

Commit 972a1a5

Browse files
committed
Changed toolbar icon click to open new tab
1 parent 3da43dd commit 972a1a5

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

brave-omnibox/chromium/extension/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const braveURL = 'https://search.brave.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: `${braveURL}/search?q=${query}&summary=1` })
16+
chrome.tabs.create({ url: `${braveURL}/search?q=${query}&summary=1` })
1717
})
1818

1919
// Suggest Brave AI on short prefix used

brave-omnibox/firefox/extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const braveURL = 'https://search.brave.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: `${braveURL}/search?q=${query}&summary=1` })
16+
chrome.tabs.create({ url: `${braveURL}/search?q=${query}&summary=1` })
1717
})
1818

1919
// Suggest Brave AI on short prefix used

chatgpt-omnibox/chromium/extension/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const chatgptURL = 'https://chatgpt.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: `${chatgptURL}/?q=${query}` })
16+
chrome.tabs.create({ url: `${chatgptURL}/?q=${query}` })
1717
})
1818

1919
// Suggest ChatGPT on short prefix used

chatgpt-omnibox/firefox/extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const chatgptURL = 'https://chatgpt.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: `${chatgptURL}/?q=${query}` })
16+
chrome.tabs.create({ url: `${chatgptURL}/?q=${query}` })
1717
})
1818

1919
// Suggest ChatGPT on short prefix used

deepseek-omnibox/chromium/extension/service-worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function tabIsLoaded(tabId) {
2020
chrome.action.onClicked.addListener(async () => {
2121
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true }),
2222
query = activeTab.url ? new URL(activeTab.url).searchParams.get('q') || 'hi' : 'hi',
23-
updatedTab = await chrome.tabs.update(activeTab.id, { url: deepseekChatURL })
24-
tabIsLoaded(updatedTab.id).then(() => chrome.tabs.sendMessage(updatedTab.id, query))
23+
newTab = await chrome.tabs.create({ url: deepseekChatURL })
24+
tabIsLoaded(newTab.id).then(() => chrome.tabs.sendMessage(newTab.id, query))
2525
})
2626

2727
// Suggest DeepSeek on short prefix used

deepseek-omnibox/firefox/extension/background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function tabIsLoaded(tabId) {
2020
chrome.action.onClicked.addListener(async () => {
2121
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true }),
2222
query = activeTab.url ? new URL(activeTab.url).searchParams.get('q') || 'hi' : 'hi',
23-
updatedTab = await chrome.tabs.update(activeTab.id, { url: deepseekChatURL })
24-
tabIsLoaded(updatedTab.id).then(() => chrome.tabs.sendMessage(updatedTab.id, query))
23+
newTab = await chrome.tabs.create({ url: deepseekChatURL })
24+
tabIsLoaded(newTab.id).then(() => chrome.tabs.sendMessage(newTab.id, query))
2525
})
2626

2727
// Suggest DeepSeek on short prefix used

perplexity-omnibox/chromium/extension/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const perplexityURL = 'https://www.perplexity.ai'
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: `${perplexityURL}/search/new?q=${query}` })
16+
chrome.tabs.create({ url: `${perplexityURL}/search/new?q=${query}` })
1717
})
1818

1919
// Suggest Perplexity on short prefix used

phind-omnibox/chromium/extension/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const phindURL = 'https://www.phind.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: `${phindURL}/search?q=${query}` })
16+
chrome.tabs.create({ url: `${phindURL}/search?q=${query}` })
1717
})
1818

1919
// Suggest Phind on short prefix used

phind-omnibox/firefox/extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const phindURL = 'https://www.phind.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: `${phindURL}/search?q=${query}` })
16+
chrome.tabs.create({ url: `${phindURL}/search?q=${query}` })
1717
})
1818

1919
// Suggest Phind on short prefix used

you.com-omnibox/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

0 commit comments

Comments
 (0)