Skip to content

Thunderbird

Migrate (Legacy) Thunderbird add-on to MailExtension for Thunderbird 68

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 my 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:

  • Replace install.rdf with manifest.json: This is really straightforward given the documentation
  • 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"
    }
    
  • In the chrome.manifest I had 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 😅.

Thunderbird Extension: Hide Badge Icon

This post is archived. It is left as is and won't receive updates.

About two years ago (a few months after switching to Mac OSX) I noticed that the badge on the Thunderbird app icon is quite distracting for me while I work (it notifies about new and how many emails were received). As soon as it pops up I would notice it and felt an urge to immediately check what the new email is about. Then of course, the current focus and concentration is lost.

I wanted to turn the badge of, as this is generally supported on OSX. However, I found out that this is not the case with Thunderbird.

Note

This functionality is supported natively with newer versions of Thunderbird.

I didn't give up easily and went to search the Internet. Unfortunately, no one had attempted this, complained about it or filed a bug report. Also, I could not find any documentation about this on the Thunderbird pages.

I wanted to know more and started digging into the source code of Thunderbird. An advantage of open source software. Because this is a Mac OSX specific thing, searching for files related to OSX seemed logical. Eventually, I found the file nsMessengerOSXIntegration.cpp (it is now nsMessengerOSXIntegration.mm) where the logic for this functionality is implemented. While I did find an interesting piece of code, the revisions also were helpful, which led me to bug report #274688. In this bug report a hook was introduced which allows to observe a property called before-unread-count-display. Upon notification, the desired badge label can be modified/adjusted (e.g., making 100+ for all counts greater than 100) before it is displayed. If an empty string is returned, however, the badge will be hidden.

And that was it. I digged into it and found an (unfortunately) undocumented extension feature. This allowed me to write an extension with the purpose of hiding the badge in all situations. I have actually used it for more than two years. My intention was always to release it and share it with others, but kind of put it off. Since I was updating my other extension anyway, I finally did it.

To my surprise, it was fully reviewed without any complaints right away. So if you want to work without distractions, you can now use Hide Badge Icon to hide the badge of the Thunderbird app icon.

Thunderbird Extension: Toggle Headers Updated

My Thunderbird extension Toggle Headers was running smoothly for a long time. It only needed to be kept aligned with the Thunderbird version updates (for the maximum supported version of the extension). Everything was fine until the third-party extension CompactHeader, which is supported by Toggle Headers, released a new version with internal changes. These changes involved some refactoring, which meant the function to toggle between the compact and expanded header pane had a different name (or namespace).

The way I noticed this, since I don't use CompactHeader myself, was by receiving a 1-star review. Of course, no proud developer likes this. Generally, I prefer to be contacted directly with bug reports and be able to respond before receiving a review. If a developer doesn't respond, a bad review is then acceptable. However, in this case bad reviews could be turned into very good ones, so no complaints in the end 😄.

Long story short, a new version of Toggle Headers was released. Basically, Toggle Headers v1.0 restores support for CompactHeader 2.1.0 and higher, but at the same time, it still works with older versions. Unfortunately, the new version of CompactHeader contains a bug that prevents toggling between the header modes (Normal/All) to work properly. I reported the bug in the referenced support forums, but haven't received a response to date.

This required a workaround to be integrated into the new version. When switching from collapsed header pane and Normal to All headers and then back to Normal, the header pane would stay expanded. The Compact option however is checked in the menu. The workaround simply disables and enables the compact header again to make it work until a fixed version gets released.

The same kind of story happened with another extension. An extension I never heard of named Phoenity Buttons made my extension not work anymore. This was due to the usage of the same key shortcut (H). Somehow Thunderbird gave precedence for the key binding to that extension. Fortunately, the developer of this extension was very helpful and even willing to change his key binding to another one 👍.

All in all, a great experience with the Thunderbird extension and user community.

Show old title bar in Thunderbird

This post is archived. It is left as is and won't receive updates.

With the latest release of Thunderbird 17, the menu bar and tabs are drawn into the title bar. On Windows XP, this then looks like the following:

New title bar in Thunderbird

In the default theme, the active title bar is blue. Thunderbird adds more stuff to the title bar which increases the blue area. This looks odd, and fortunately this can be configured. Go to Settings > Advanced > Config Editor (in the Advanced Configuration section).

Search for the setting mail.tabs.drawInTitlebar and change the value to false (e.g., by double-clicking on it). And voilà, much better:

Restored title bar in Thunderbird

Hide star besides email addresses in Thunderbird

This post is archived. It is left as is and won't receive updates.

If you—for some reason—don't like the yellow (for contacts in your address book) or gray (for unknown contacts) star next to email addresses in the message header there's a simple way on how to hide it.

If you don't have one yet, all it needs is a file called userChrome.css inside a folder called chrome inside your profile folder. Add the following content:

.emailStar {
    display: none !important;
}

If you ever want to see it again just delete those lines.

Thunderbird Extension: Toggle Headers

After updating my Thunderbird to the current version there was one extension not working anymore: Headers Toggle. Even manually adjusting maxVersion in the install.RDF to pretend it's compatible didn't work. This extension allowed you to switch the headers view between seeing all headers (All) and the most important header information (Normal) with a single key shortcut H. Unfortunately this extension hasn't been updated in a long time.

I created a new Thunderbird extension called Toggle Headers that allows you to do this and works with the current (and upcoming) Thunderbird version.

Update: The newest version (0.3) of Toggle Headers  is compatible with CompactHeaders. When both are used at the same time the current state of the headers view is taken into account:

  • when collapsed and H is pressed, the headers view will be expanded and all headers shown
  • pressing H again will switch back to the normal headers view but also collapse the view again (the previous state is remembered)

Newer blog posts