1

I'm developing a Chrome extension and need to open a number of tabs with omnibox entries filled out.

As an example, imagine typing "test" into the omnibox, it will do a Google search for "test". However, if you type "http://test.com", it'll open that URL. I wish to have that same behaviour.

Calling chrome.tabs.create({ url: 'test' }); attempts to open a new tab at the URL: chrome-extension://noaegdcbalcniptpnggbfgapjmlfxpxx/test

Is there an omnibox protocol? omnibox:test or omnibox:http://test.com, for example?

Or an API? chrome.omnibox.open('test') or chrome.omnibox.open('http://test.com') for example? (I've checked the docs, but can't find anything)

Mike
  • 8,767
  • 8
  • 49
  • 103
  • Are you trying to search using the default provider? Or specifically want to open the suggestions list for a string? – Xan Jun 30 '16 at 12:58
  • @Xan I'd like to mimic omnibox. Sometimes that's a search, sometimes it's a http:// protocol (which just visits that URL), sometimes it might be ftp://, could be an external protocol (mailto:, steamapp://, etc). I basically want to do whatever Chrome itself would do when that string is entered – Mike Jun 30 '16 at 13:20

0 Answers0