0

I'm building a Firefox extension and was confused by what I can and cannot do with the WebExtensions API.

Basically what I'm trying to do is perform some CSS operation in the address bar of Firefox, for simplicity, say add an underline to the URL or make the base URL bold.

How can I do it with the WebExtensions API? I've seen the documentation and insertCSS is close, but does the same for the page not the addressbar.

Note that I'm not looking at Page Actions, but rather styling the text in the address bar itself.

Help much appreciated. :)

navinpai
  • 955
  • 11
  • 33
  • I don't believe this is possible with WebExtensions. WebExtensions are *much* more limited in their ability to impact the Firefox UI than [other extension types](http://stackoverflow.com/documentation/firefox-addon/3235/introduction-to-firefox-add-ons/13574/introduction#t=201609290133319078047). Depending on all of what you are wanting to do, a [Theme](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Themes) may be appropriate. If it is just for personal use, you may find that adding/editing your *userChrome.css* will be sufficient. – Makyen Nov 03 '16 at 11:37

1 Answers1

0

No, this is not possible at all (with WebExtensions). Consider the security implications!

The closest API available for interaction with the address bar is the chrome.omnibox API, and it would not allow this. And even that is not yet implemented in FF.

Xan
  • 74,770
  • 16
  • 179
  • 206