Like with Firefox, Thunderbird is also changing add-ons to WebExtensions (called MailExtension there). Thunderbird 68 introduced this requirement. Users on older versions still are not offered the latest version through the automatic updater so it stayed below my radar.

Recently, some users of small Toggle Headers extension reached out to me asking whether I intend to update it for Thunderbird 68 and later. I finally got a chance to migrate it and it was fairly easy in my case.

The easiest way is to convert it to a MailExtension with legacy support that allows to keep the old XUL stuff. The main changes I had to do were:

  1. Replace install.rdf with manifest.json: This is really straightforward given the documentation
  2. Add a legacy key to the manifest. Some examples showed "legacy": true but that did not work. Instead, you need to specify:
    "legacy": {
         "type": "xul" 
  3. In the chrome.manifest I overlaid mailWindowOverlay.xul. This had to be changed to messenger.xul. See the note on overlaying.

With this, the extension can be packaged up (now with a nice little ant build script that automates this) and uploaded to Thunderbird’s add-ons site. Luckily, there it passed the review with no complaints and version 2.0 is now available.

I think it should be possible to accomplish this without any old XUL stuff. There is a MailExtension API documentation that outlines commands. Since users mainly use the add-on for the convenient key shortcut (H) this seems feasible. But that’s for another day.