File tree Expand file tree Collapse file tree 11 files changed +13
-13
lines changed
perplexity-omnibox/chromium/extension Expand file tree Collapse file tree 11 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const braveURL = 'https://search.brave.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const braveURL = 'https://search.brave.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const chatgptURL = 'https://chatgpt.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const chatgptURL = 'https://chatgpt.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ function tabIsLoaded(tabId) {
2020chrome . 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
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ function tabIsLoaded(tabId) {
2020chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const perplexityURL = 'https://www.perplexity.ai'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const phindURL = 'https://www.phind.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const phindURL = 'https://www.phind.com'
1313chrome . 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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const youURL = 'https://you.com/'
1313chrome . 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
You can’t perform that action at this time.
0 commit comments