Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Building a Firefox add-on that responds to / modifies omni-box input?

8 views
Skip to first unread message

surely....@gmail.com

unread,
Jun 1, 2017, 3:08:13 PM6/1/17
to mozilla...@lists.mozilla.org
I'm reading about building Firefox add-ons using the new WebExtensions APIs, and wondering about the limitations of the omnibox api specifically.

It looks like the only way to react to user input in the omnibox is to register a keyword in the manifest.json, which allows the add-on to show a menu and respond to input based on what is typed next. My question is, what if I want to respond to input without requiring a specific prefix, or update the contents of the omnibox? Some examples:


1. Allow the user to change the keyword, or to add their own keywords that the add-on can respond to.

2. If the user types something that looks like an ISBN, or a UPS tracking number, or an email address, or phone number, or some other well-known format, automatically offer results from an appropriate search.

3. Add a feature like Chrome's omnibox, allowing auto-completion of keywords after typing a prefix and hitting tab (or selecting the first result). This would require modifying the contents of the omnibox, as well as reading it.

4. Adding something like "syntax coloring" into the omnibox for more complex inputs.

Is there any way to do any of these with a WebExtension add-on? If not, is there any other way to build add-ons that is not about to be deprecated, that would allow this sort of functionality?

William Bamberg

unread,
Jun 2, 2017, 2:06:57 PM6/2/17
to surely....@gmail.com, mozilla...@lists.mozilla.org
Hi

As far as I know these things are not possible with the current omnibox
API, but the WebExtensions team in Mozilla is open to considering additions
to the APIs. If I were you, I'd ask about this on the dev-addons mailing
list: https://mail.mozilla.org/listinfo/dev-addons and if it seems to get a
reasonable reception, file a bug to add it.

Will
> _________________________________________________________________________
> Discussing Developer documentation on MDN: dev-mdc mailing list
> List email: dev...@lists.mozilla.org
> Manage your membership: https://lists.mozilla.org/listinfo/dev-mdc
> Unsubscribe: https://lists.mozilla.org/options/dev-mdc/wbamberg%
> 40mozilla.com?unsub=1&unsubconfirm=1
> MDN contributor guide: http://bit.ly/ContributorGuide
>
0 new messages