javascriptgoogle-chromegoogle-chrome-extensionomnibox

How can I add to the context menu in Chrome's Omnibox(Address bar)?


I am building a Chrome extension that translates typos in a text field within the Chrome browser.

I have used the contextMenu API and succeeded in implementing the extension, with which the user can bring up a context menu and select the extension menu to translate his or her selected text.

I noticed, however, the permission of the contextMenu API did not extend to the omnibox, where a different context menu(shown below) without my extension popped up.

Could you shed some light on this and help me figure out what permissions/APIs I should look into in order to take control of chrome's onmibox's context menu?


Solution

  • As you discovered yourself, it is indeed impossible to add an item to Omnibox context menu with the current iteration of contextMenus API. I don't know if there are any plans to change it.