cooklecurry
(cooklecurry@gmail.com)
January 11, 2020, 10:23am
1
Hi. My add-on doesn’t work legacy mode at TB 68, so I try to remake it by MailExtensions.
And now I wonder how to make add-on which work on message compose window.
I assume manifest.json like below, but thunderbird said “This is not compatible with TB 68”. (Maybe “content_scripts” is not supported by Thunderbird.)
"content_scripts": [
{
"matches": ["chrome://messenger/content/messengercompose/*"],
"js": ["scripts/sample.js"]
}
],
DaveRo
January 11, 2020, 11:53am
2
You almost certainly can’t do it yet, it needs MailExtension APIs which don’t yet exist. For example I’m waiting for APIs to modify recipients: https://bugzilla.mozilla.org/show_bug.cgi?id=1585995 (and the UI is changing too).
If that bug doesn’t cover your requirements then you could raise one like that. Many others have similar requirements.
You might also be able to write a WebExtension experiment API: https://thunderbird-webextensions.readthedocs.io/en/latest/how-to/experiments.html
Either way, please follow and ask here: https://thunderbird.topicbox.com/groups/addons
Content Scripts don’t work with the compose window AAUI - maybe only html tabs - not sure.
C-E
January 11, 2020, 9:16pm
3
I also think the only way to do want you want is to write a WebExtension experiment.
If you like, you can use my example “DeleteRow” as a starting point and put in your code:
Extension that implements a button in the Compose Window to delete a row of a table.
You should also read this:
https://thunderbird.topicbox.com/groups/addons/T881082c3e2818d87/how-to-get-the-first-table-in-the-composer-window
in case you want to access/modify the composed message.
cooklecurry
(cooklecurry@gmail.com)
January 12, 2020, 12:24pm
4
Thank you for your advice.
I found out what I want to do is not able to do now by MailExtensions.
So, I try to write WebExtension experiment.
cooklecurry
(cooklecurry@gmail.com)
January 12, 2020, 12:25pm
5
Thank you for your advice.
I try to write WebExtension experiment and will refer to your example.