A Thunderbird "stdlib"

Jonathan Protzenko jonathan.protzenko at gmail.com
Thu Dec 16 21:13:50 UTC 2010


In the process of writing Thunderbird Conversations, I've been writing a 
considerable amount of small utility functions. Such functions include 
wrappers to easily get a given address book, a wrapper that deletes 
messages, archives some, tells you whether a message is in a "Drafts" 
folder, a function to get a given message's body... these wrappers have 
been pretty stable for quite some time now.

I'll probably enrich the set with my JS message sending backend, which 
should be shared by both Thunderbird Conversations (for quick reply) and 
"Compose in a tab" [1].

I don't feel like this is worth integrating into the tree. However, what 
if I spun off these "common parts" into a separate github repo and we 
started advertising it as a "readymade" package that extension authors 
can include in their own builds, to make their lives easier? I feel like 
that's exactly the kind of stuff I missed when I was starting...

Here are some sample files:

(the last one is is kinda messy, as it includes specific quote detection 
heuristics, but the first functions are very useful imho).



[1] The backend was initially developed inside Compose in a tab, it's 
been improved in Thunderbird Conversations, and now I need to factor out 
the common parts and make the two addons share as much code as possible.

More information about the tb-planning mailing list