Reputation: 4845
I learnt how to invoke my extension's background js by typing a specific keyword in the omnibox. But I need to enable my extension to listen to the text typed in the omnibox without the help of any keyword.
Example: If user types, abc or abcd or abcd.com, my extension should get triggered. Here I cant rely on any keyword, cause user would directly type the target site name.
When I tried using the keyword as the possible target name (say abcd.com) the triggering doesnt work since the moment user types abc, chrome autosuggests abcd.com and user selects it directly and keyword triggering doesnt work.
I googled but all the tutorials I found were around using keywords. I want something like an eventlistener which would listen to every tab's omnibox all the time.
Any tutorials, or sources would be great help to me.
Upvotes: 4
Views: 601
Reputation: 77601
This is impossible. The API does not allow you to "spy" on the Omnibox.
That's the point of the keyword - only after you've typed it the extension is informed.
Upvotes: 4