MozillaZine

Thunderbird 60 / Addon Compatibility

User Help for Mozilla Thunderbird
cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted January 29th, 2019, 11:20 pm

I have a beta update for Message Archive Options:

I am also a new owner so I will be able to update ATN after some testing.
https://addons.thunderbird.net/en-US/th ... src=search

Repository: (beta XPI in latest beta branch)
https://github.com/cleidigh/Message-archive-options-TB.git

Changes:
- install.rdf : bump version, add type
- options.xul : add new CSS reference for preferences

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted January 30th, 2019, 12:18 am

morat wrote:@siffemoz

The Close On Reply extension should work.

The New Mail Attention extension needs a fix.

Please test the extension before asking for a fix.



Morat:

I can pick up New mail Attention as well as contacting the original author.
Just want to make sure no one is already doing this...

morat
 
Posts: 3280
Joined: February 3rd, 2009, 6:29 pm

Post Posted January 30th, 2019, 8:04 am

@cleidigh

I'm not working on the New Mail Attention extension.

I thought there would be no easy fix for the Message Archive Options extension and the Super Date Format extension since the developers removed the toLocaleFormat method.

toLocaleFormat
http://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted January 30th, 2019, 12:16 pm

Well that may very well be an issue. But I mentioned I still need to do more testing. The UI appears okay so far, I'm working on this today.

cleidigh
 
Posts: 11
Joined: January 22nd, 2019, 11:20 pm

Post Posted January 30th, 2019, 11:02 pm

morat
hat tip to you - fooled by defaults...

With toLocaleFormat !== toLocaleDateString at all , I found a great replacement:
https://github.com/thdoan/strftime

I don't need a full strftime() replacement for 'Message Archive Options', but
as you pointed out 'Super Date Format' certainly does.

The strftime function from thdoan is really small and nicely done. There should
be no problem with the MIT license and as a courtesy I contacted the author and
he is fine with the use.

If it makes sense I can add 'Super Date Format' to my to do list.

I'm still getting my wings with Thunderbird so nothing 's fast yet.

Thanks for the tips

kswartz
 
Posts: 66
Joined: August 18th, 2004, 4:54 pm

Post Posted February 6th, 2019, 1:48 pm

SearchWith 0.4.4.1

Now works properly in Thunderbird 60.

New version available at https://github.com/kswartz26/SearchWith (direct download)

Note: this modified archive is NOT signed.

* chrome/content/conquery/main.js

Code: Select all
-              createInstance(Components.interfaces.nsILocalFile);
+              createInstance(Components.interfaces.nsIFile);


Code: Select all
-                    createInstance(Components.interfaces.nsILocalFile);
+                    createInstance(Components.interfaces.nsIFile);


Code: Select all
-     var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+     var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);


Code: Select all
-                createInstance(Components.interfaces.nsILocalFile);
+                createInstance(Components.interfaces.nsIFile);


* chrome/content/conquery/sw-conquery.js

Code: Select all
-                        createInstance(Components.interfaces.nsILocalFile);
+                        createInstance(Components.interfaces.nsIFile);


Code: Select all
-                      createInstance(Components.interfaces.nsILocalFile);
+                      createInstance(Components.interfaces.nsIFile);


* chrome/content/searchwith.js

Code: Select all
-                 browserBookmarkEngineId = thisPrefBranch.getComplexValue(
-                            "flock.favorites.webservice.id",
-                                     Components.interfaces.nsISupportsString).data;
+                 browserBookmarkEngineId = thisPrefBranch.getStringPref("flock.favorites.webservice.id");


Code: Select all
-                 browserPhotoEngineId = thisPrefBranch.getComplexValue(
-                           "flock.photo.api.uiname",
-                                     Components.interfaces.nsISupportsString).data.toLowerCase();
+                 browserPhotoEngineId = thisPrefBranch.getStringPref("flock.photo.api.uiname").toLowerCase();


Code: Select all
-                                             Components.interfaces.nsILocalFile);
+                                             Components.interfaces.nsIFile);


Code: Select all
-          prefValue = swPrefBranch.getComplexValue(aPref,
-                         Components.interfaces.nsISupportsString).data;
+           prefValue = swPrefBranch.getStringPref(aPref);


Code: Select all
-          swPrefBranch.setComplexValue(aPref,
-                   Components.interfaces.nsISupportsString, suppStr);
+          swPrefBranch.setStringPref(aPref,suppStr);


Code: Select all
-             return swPrefs.getComplexValue("engine-list."+anEngineId,
-                                 Components.interfaces.nsISupportsString).data;
+           return swPrefs.getStringPref("engine-list."+anEngineId);


Code: Select all
-             return swPrefs.getComplexValue("service-list."+aServiceId,
-                             Components.interfaces.nsISupportsString).data;
+             return swPrefs.getStringPref("service-list."+aServiceId);


* chrome/content/searchwithOptions.js

Code: Select all
-                                             Components.interfaces.nsILocalFile);
+                                             Components.interfaces.nsIFile);


I have to extend my gratitude to the contributors of this thread. I had been mourning the loss of one of my favorite Thunderbird extensions, SearchWith, since moving to v60. Today, I finally got nerd-sniped enough to see if I could fix it. After about 30 minutes of digging around, I found this thread, and there were enough details in here to pull it off. Happy to be able to contribute back.
- Keith
Software & Compliance Architect

cubeflex
 
Posts: 2
Joined: March 1st, 2019, 12:14 am

Post Posted March 1st, 2019, 12:23 am

morat wrote:Minimize On Start and Close 1.3.2.1 [Properties broken]

I got the Minimize On Start and Close extension working correctly in Thunderbird 60.

It looks like there is a bug in Thunderbird 60. The close event doesn't fire and that breaks the minimize on close feature. A workaround is to switch the close event for the DOMWindowClose event.

Close Event
http://developer.mozilla.org/docs/Mozilla/Tech/XUL/Events/close_event

DOMWindowClose Event
http://developer.mozilla.org/docs/Web/Events/DOMWindowClose

Fix:

* install.rdf

Code: Select all
- <em:version>1.3.2.1-signed.1-signed</em:version>
+ <em:version>1.3.2.2</em:version>

Code: Select all
- <em:maxVersion>3.2a1pre</em:maxVersion>
+ <em:maxVersion>60.*</em:maxVersion>

* chrome\content\moscFunc.js

Code: Select all
- window.addEventListener("close", mosc_480adee0.minimizeOnClose, false);
+ window.addEventListener("DOMWindowClose", mosc_480adee0.minimizeOnClose, false);

* chrome\content\options.xul

Code: Select all
  <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+ <?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>

Minimize On Start and Close
http://addons.thunderbird.net/thunderbird/addon/48585


Hello morat,

could you help me with this? I would like to use this addon again. I have set "extensions.strictCompatibility" to false. Downloaded the latest version from minimizeOnClose 1.3.2 from the website. TB said i can´t install the addon because its not compatible.
Furthermore how/where i have to include the code you posted?
Would be great if you send me a dm.
Thanks for your help!

EDIT: Sorry, now it works. Ignore this post and thanks for your work :)

tanstaafl
Moderator

User avatar
 
Posts: 45482
Joined: July 30th, 2003, 5:06 pm

Post Posted March 1st, 2019, 1:08 am

cubeflex:

You need to make the fixes (changes) he documented to three files stored in the *.xpi file before trying to install it. The *.xpi file is just a renamed zip file.

I suggest you use 7-zip to edit the files in place. You can open the archive, select a file, right click on it and select open, edit it using the default text editor, save the file, and when you close the text editor 7-zip should ask you if you want to update the archive with the edited copy of the file.

cubeflex
 
Posts: 2
Joined: March 1st, 2019, 12:14 am

Post Posted March 1st, 2019, 1:19 am

tanstaafl wrote:cubeflex:

You need to make the fixes (changes) he documented to three files stored in the *.xpi file before trying to install it. The *.xpi file is just a renamed zip file.

I suggest you use 7-zip to edit the files in place. You can open the archive, select a file, right click on it and select open, edit it using the default text editor, save the file, and when you close the text editor 7-zip should ask you if you want to update the archive with the edited copy of the file.


Thanks for your help! It works perfect! :)

onesolo
 
Posts: 5
Joined: March 1st, 2019, 4:18 am

Post Posted March 1st, 2019, 5:08 am

I notice that on the OP is saying that minimizetotray reanimated is broken, but it's not, it works just fine because there's been updating on it https://addons.thunderbird.net/en-US/th ... eanimated/

Also, is there anyone that can fix Autocopy https://addons.thunderbird.net/pt-PT/th ... src=search ?

Somebody
 
Posts: 87
Joined: January 20th, 2006, 9:17 am

Post Posted March 1st, 2019, 5:59 am

@onesolo: Thank you, updated the first post for MinimizeToTray :)

morat
 
Posts: 3280
Joined: February 3rd, 2009, 6:29 pm

Post Posted March 2nd, 2019, 4:30 pm

Autocopy 2 1.2.91 [Properties broken]

AFAICT, I got the Autocopy 2 extension working correctly in Thunderbird 60.

Fix:

* install.rdf

Code: Select all
- <em:version>1.2.91</em:version>
+ <em:version>1.2.91.1</em:version>

Code: Select all
- <em:maxVersion>30.0</em:maxVersion>
+ <em:maxVersion>60.*</em:maxVersion>

* chrome\content\optionsTb.xul

Code: Select all
  <?xml-stylesheet href="chrome://autocopy/skin/autocopy.css" type="text/css"?>
+ <?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>

* chrome\content\overlayMail.js

Code: Select all
- for each (var i in AutoCopyAppMail.modes) {
+ for (let i of AutoCopyAppMail.modes) {

AutoCopy 2
http://addons.thunderbird.net/thunderbird/addon/337159

P.S.

In the 3pane window and addon options dialog, I get document.getElementById(...) is null errors in the overlayMail.js and options.js files after fixing the extension. I think the developer is letting the extension error on purpose so you can ignore these errors.

onesolo
 
Posts: 5
Joined: March 1st, 2019, 4:18 am

Post Posted March 8th, 2019, 8:51 am

morat wrote:Autocopy 2 1.2.91 [Properties broken]

AFAICT, I got the Autocopy 2 extension working correctly in Thunderbird 60.

Fix:

* install.rdf

Code: Select all
- <em:version>1.2.91</em:version>
+ <em:version>1.2.91.1</em:version>

Code: Select all
- <em:maxVersion>30.0</em:maxVersion>
+ <em:maxVersion>60.*</em:maxVersion>

* chrome\content\optionsTb.xul

Code: Select all
  <?xml-stylesheet href="chrome://autocopy/skin/autocopy.css" type="text/css"?>
+ <?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>

* chrome\content\overlayMail.js

Code: Select all
- for each (var i in AutoCopyAppMail.modes) {
+ for (let i of AutoCopyAppMail.modes) {

AutoCopy 2
http://addons.thunderbird.net/thunderbird/addon/337159

P.S.

In the 3pane window and addon options dialog, I get document.getElementById(...) is null errors in the overlayMail.js and options.js files after fixing the extension. I think the developer is letting the extension error on purpose so you can ignore these errors.

thkx a lot... going to see if it works
By the way, there's a completely addon for firefox, webextension addon, that works in the same way, but the dev refuses to port it to TB.
https://addons.mozilla.org/en-US/firefo ... clipboard/

If someone here could port this to TB it would be great... I already tried to look it but the files structure from webextension are a bit different from legacy addons and I don't have the skill to modify them... :(

Well, in the meantime autocopy modification worked just fine!!! Thkx!! I guess I don't have more issues with the new TB !!! until they break with the old addons

morat
 
Posts: 3280
Joined: February 3rd, 2009, 6:29 pm

Post Posted March 8th, 2019, 10:11 am

@onesolo

The developers are still working on the WebExtension APIs for Thunderbird.

Thunderbird WebExtension APIs
http://thunderbird-webextensions.readthedocs.io/en/latest/

AutocopySelection2Clipboard uses these APIs...

http://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/notifications
http://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/storage
http://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation

I don't think these APIs are available yet.

tanstaafl
Moderator

User avatar
 
Posts: 45482
Joined: July 30th, 2003, 5:06 pm

Post Posted March 31st, 2019, 11:21 pm

https://groups.google.com/forum/#!topic ... d5dnRMiqRs has several PDF attachments (top 10, top 25, top 100 etc.) about the status of all the add-ons on thunderbird.net (when updated, how many days since it was updated, authors, number of daily users, number of downloads, does it claim to work with version 52/58/60/61+, etc.)

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 10 guests