Is it possible to modify the browser UI with the new WebExtension API?

More specifically I would like to know if it is possible to create a toolbar using this new API. I don’t want to loose my restored addon bar. I have quite a lot of addons that would overcrowd the navigation bar, and Chrome’s approach of placing them in a ">> submenu" is not good to me. I choose to use Firefox specially because of its customization options (the Personas skin themes, the ability to arrange the elements of the UI…)

1 Like

I’m pretty sure this is not yet possible. You will have to use the Addon SDK for now - https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Getting_Started_(jpm)

The problem with that SDK is that it will become deprecated with the release of Firefox 48 (planned to the end of 2017 according to the documentation) and eventually it will become unsupported, breaking dozens of addons (so maybe I will not need an addon bar by then…)

I think there is a workaround to create toolbars, according to this SO post.

The trick is to inject the toolbar as an iframe on the page. Sadly, according to Chrome’s implementation of the Web Extensions, the JavaScript on that frame will not have access to privileged JS code. So, implementing an addon bar this way will not be possible on Firefox unless they give access to that code for web_accessible_resources

I think you’re misreading the documentation you linked. It states WebExtensions become officially available with Firefox 48, but it doesn’t state that the SDK is deprecated by then. Before the SDK is deprecated there will be transition APIs, that ease migrating data from one to another and starting to use the WebExtensions API where it is already useful.

See https://mozilla.aha.io/published/0d49e74c6853d3d721010bd9d4f67f34 for a timeline of Add-on things.

1 Like

Thanks for the info. That’s good to know. However I think the documentation that I linked is not correctly wrote, because it clearly reads:

The rest are expected to be deprecated over the same period of time

That part really scared me because I thought that we would be left with just the WebExtensions.

Oh, yes by the end of 2017 is about accurate toward the plans, however that’s not when 48 will come out.