Is there any way to build a firefox extension (that isn’t considered “legacy”) that can do any of the following?
-
Allow the user to change the omnibox keywords used by the extension, or add additional keywords? (The omnibox api requires all keywords to be listed in manifest.json.)
-
Respond to input in the address bar without a keyword? (Say, detecting when the user has typed something that looks like an ISBN or an email address, and displaying appropriate responses in the pop-up menu)
-
Change the input in the address bar (Example: Google Chrome automatically registers domain names as keywords for site-specific searches, but the user only has to type a prefix of the keyword and then hit tab, auto-completing the rest - saving the user from having to memorize a unique keyword for every search).
-
Style the input in the address bar (to provide syntax coloring for complex input)
-
If any of 1-4 can’t be done in the address bar, can they be done in the search box? Can the pop-up menu of suggestions that appears when you type in the search box be generated by javascript code, or must it come from a server?
-
If any of 1-4 can’t be done in the address bar OR the search box, are there any plans to extend the WebExtensions API to allow any of these things?
-
If any of 1-4 can’t be done, whether or not they might be doable in some future version, what are some workarounds that would allow me to present the user with a way to easily interact with my add-on primarily or exclusively by typing? I can think of:
- A toolbar button or address bar button, with an associated keyboard shortcut, which displays a pop-up with a text input that does all the things I wish the address bar did.
- a “virtual toolbar” injected into every web page loaded, right at the top, with my add-on’s functionality embedded in it. This seems like a Bad Idea for lots of obvious reasons.
- A sidebar, which isn’t very useful for this case but is worth mentioning for completeness.
Background info: I’m mainly trying to implement something like Google Chrome’s auto-adding and auto-completion of search keywords, although there are other things I’d like to do with this as well.