The Catch

Resources in Bootstraped Extensions

by Michael

I have been working on trying to make Toolbar Buttons install without needing to restart Firefox. One thing I needed was resources:// urls. Problem being that they are not supported in bootstrapped extensions, so you have to do it manually.

I saw some code samples for how to do this, but I don't really like them. I took a slightly different approach. I put my resources somewhere in chrome:// so for example chrome://toolbar-buttons/content/resources/. Then want to be able to access the contents of this folder as resource://toolbar-buttons/. For that I use the following code in my bootstrap.js.

If you found this interesting you might want to