Closed mikehardy closed 5 years ago
FWIW, apart from the obvious / large change to how the whole add-on would work, the things at the heart of this add-on: getting the current message to create a link, and getting a specific message by id to display it when opening a link - appear to be available as a WebExtensions API already:
https://thunderbird-webextensions.readthedocs.io/en/latest/mailTabs.html#getselectedmessages-tabid
https://thunderbird-webextensions.readthedocs.io/en/latest/messages.html#get-messageid
Extra bits like listing available tags and setting them are available as well. https://thunderbird-webextensions.readthedocs.io/en/latest/messages.html#listtags
Dang, I had a second to give Thunderbird 64b03 a chance, and the extension does not work because it is not "restartless":
1544461885530 addons.xpi-utils WARN addMetadata: Add-on thunderlink@mozilla.org is invalid:
Error: Non-restartless extensions no longer supported(resource://gre/modules/addons/XPIInstall.jsm:647:13)
JS Stack trace: loadManifestFromRDF@XPIInstall.jsm:647:13
This turned out to be easy, we'll have TB64 as soon as needed. I left comments on what worked here: https://github.com/mikehardy/thunderlink/commit/0bd27a688a1f7dbef5fa3298bf0b5b29d4bf85cc
I'm just not sure how far back ChromeUtils is available, I need to make the change and test back in versions so I can set the right minimum version for whatever historic thunderbird release supports the APIs.
At the same time should replace the dump() calls I put in for TB38 with console.log() calls again.
I want to let the current 1.2.5 release stand long enough to make sure there aren't any bugs though, before I clip off support for TB38 (and maybe 42, 52 etc)
Found a way to do it while still being backwards-compatible. Fixed in https://github.com/mikehardy/thunderlink/commit/3530b05d4b0b05f410a304550c4c1258d6d520ae
Eventually I suppose this needs to be a full blown WebExtension
In the meantime if anyone has a version of Thunderbird 64 or higher, a quick test should be done to see if it works so I can at least mark the extension as compatible with higher versions.
https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_63