Archive for the 'Extension Development' Category

CustomizableUI in Thunderbird and SeaMonkey

by Michael

I have been working towards trying to make my extension Toolbar Buttons restartless. One of the trick parts is need to create all the buttons by script. Fortunally There is CustomizableUI modules that handels all this really nicely in Firefox 29+. Unformtally, it only exists in Firefox 29+, and not in Thunderbird for example.

So what I have tried to do is impliment a module that has as close interface as possible to CustomizableUI, that works as a wrapper on top how toolbars function in Thunderbird. Really, it is just stuff you would have to write anyway to get a restartless extension adding buttons to Thunerbird, the only difference with this is that I am using almost the same interface. Once (if) CustomizableUI is added, there would be no need to change other code much.

The only difference in the interface is becuase Thunderbird can have 2 (or 3 if you have Lightening installed) toolbox's in the main window and there is a need to sellect what one you want to use. You can see the code below. Feedbox or comments welcome.

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.