Skip to content

Commit 62e5680

Browse files
committed
Changed toolbar icon click to update active tab (closes adamlui/ai-web-extensions#197) ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/perplexity-omnibox]
1 parent ab0ea6c commit 62e5680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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 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.create({ url: `${perplexityURL}/search/new?q=${query}` })
16+
chrome.tabs.update(activeTab.id, { url: `${perplexityURL}/search/new?q=${query}` })
1717
})
1818

1919
// Query Perplexity on omnibox query submitted

0 commit comments

Comments
 (0)