I just created a chrome extension using the omnibox api.
"omnibox": { "keyword" : "a" },
I found out that it is not possible to use multible keywords or let the user choose a keyword for my extension although the extension is listed on the search engines settings page:
I addition to that the priority of the extension keyword is by far the lowest.
If a User already defined a keyword in the Default search engines / Other search engines
- sections the extension keyword is not usable.
Does anyone know a solution for at least one of these issues?
Maybe by using the NPAPI?
I just created a chrome extension using the omnibox api.
"omnibox": { "keyword" : "a" },
I found out that it is not possible to use multible keywords or let the user choose a keyword for my extension although the extension is listed on the search engines settings page:
I addition to that the priority of the extension keyword is by far the lowest.
If a User already defined a keyword in the Default search engines / Other search engines
- sections the extension keyword is not usable.
Does anyone know a solution for at least one of these issues?
Maybe by using the NPAPI?
- NPAPI is for dealing with additional in-page content, not for extending/modifying browser features in general. – Georg Fritzsche Commented Apr 12, 2013 at 18:05
3 Answers
Reset to default 2This discussion has e up before and you can see an example of it here - https://code.google./p/chromium/issues/detail?id=75890.
It seems that the reason there is only one title:keyword pair is to prevent an over abundance of key words. There also does not appear to be any support that would allow for the end user to change this pair.
For some extensions I have found it necessary to edit the extension source directly. Often this is available on GitHub or similar a repository.
- Clone source to a directory on your puter
Open the
manifest.json
file in the extension's route directory. Edit or add this section:"omnibox": { "keyword" : "key" }
Where "key
" is the keyboard shortcut key itself.
- In chrome, go to:
chrome://extensions/
- Delete the old extension (careful of deleting important data if relevant)
- Switch on
developer mode
in top right of page - Select
Load unpacked extension...
and navigate to the cloned directory - Verify the extension has loaded in Chrome and works correctly
- It is a security risk to browse the Internet with Chrome Extensions
developer mode
left on. Solve this bypacking
the extension into a single .crx file (a type of .zip file). - Delete the newly created "unpacked" extension and click
Pack extension...
(you can sign the file with a .pem key but this is not necessary). - Switch off
developer mode
in top right of page - Nagivate to the directory above the cloned directory
- Drag the .crx file produced in the
packing
step onto the Chrome window - The new extension should now appear on the
chrome://extensions/
page - Verify the correct result by navigating to
chrome://settings/
->Manage search engines...
- At bottom of page under "Search engines added by extensions" the keyboard shortcut should be updated and extension only appears once
I'd like to let people know that it appears that this has changed and is no longer the case. I was exploring this possibility myself and found this page stating it wasn't possible. In order to change the keyword for my extension after installation I took the following steps:
- Right click the omnibox (address bar) and select Edit Search Engines
- Scroll to the very bottom (optionally deleting half of the really long list of sites you'll find)
- Under the section for keywords for installed extensions, find the extension you wish to edit and click the keyword value to the right of it's name. There is no edit button, it will turn into an editable field.
I am using Chrome version 30.0.1588.0 on Windows, but I am not sure how long this has been editable.