Thunderbird 60 / Addon Compatibility

User Help for Mozilla Thunderbird
Post Reply
DaveRo
Posts: 69
Joined: May 9th, 2008, 10:00 pm

Re: Thunderbird 60 / Addon Compatibility

Post by DaveRo »

It would be useful if the status list of addons identified legacy non-bootstrapped ones. I think it regards anything with a manifest.json as a mail extension. Presumably anything with a legacy key would qualify. Or ones with both manifest.json and chrome.manifest - it that possible?

(I was going to post that to the tb-planning google group but it said 'web posting disabled'. Do all responses have to be email?)

I'm still unsure of the future of legacy non-bootstrap addons. I read somewhere recently that they might not make it to 68. I've converted 3 for my own use - I might be wasting my time.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird 60 / Addon Compatibility

Post by tanstaafl »

"I read somewhere recently that they might not make it to 68"

You might have seen the "Legacy extensions will not be around forever, and possibly will not even make it to Thunderbird 68." warning in https://thunderbird-webextensions.readt ... egacy.html . I think Jörg Knobloch first stated it.
abarth
Posts: 2
Joined: April 5th, 2019, 3:39 am

Re: Thunderbird 60 / Addon Compatibility

Post by abarth »

morat wrote:@Firefox-Fan77

Okay. I sent a link in a private message.
please
Can you send me start and close thunderbird 1.3.2.2 fix for tb v60.0?
User avatar
cricri13
Posts: 22
Joined: May 14th, 2005, 5:11 am
Location: Marseille (France)

Re: Thunderbird 60 / Addon Compatibility

Post by cricri13 »

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/Mozil ... lose_event

DOMWindowClose Event
http://developer.mozilla.org/docs/Web/E ... indowClose

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
Bonsoir morat,
je me suis intéressé à cette application Minimize On Start and Close,
car elle est très pratique pour l'utilisation de Thunderbird en version 60.6.1;
j'ai donc appliqué tes modifications avec précision en utilisant 7zip et Notepad,
jusque là tout va bien.
Mais en exploitation, je constate les choses suivantes:
- pas d'options ( mais c'est pas grave)
- si j'utilise X pour fermer, thunderbird n'est pas minimiser
- il faut utiliser - pour minimiser donc peu d’intérêt.
Merci quand même pour tes travaux.
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

cricri13 wrote:Good evening morat,
I was interested in this application Minimize On Start and Close,
because it is very convenient for using Thunderbird in version 60.6.1;
so I applied your changes accurately using 7zip and Notepad,
So far so good.
But in operation, I notice the following things:
- no options (but it does not matter)
- if I use X to close, thunderbird is not minimized
- it must be used to minimize therefore little interest
Thanks anyway for your work.
I can open the addon options window.

i.e. Tools > Addons Options > Minimize On Start and Close

Here is how the addon works for me.

Minimize on start - succeeds
Minimize on restart - succeeds
Minimize on click close menu item in file menu - succeeds
Minimize on press ctrl w key - succeeds
Minimize on press esc key - succeeds

Minimize on click X button - fails

As far as I know, there is no solution since the close event doesn't fire correctly.
User avatar
cricri13
Posts: 22
Joined: May 14th, 2005, 5:11 am
Location: Marseille (France)

Re: Thunderbird 60 / Addon Compatibility

Post by cricri13 »

morat wrote: Here is how the addon works for me.

Minimize on start - succeeds
Minimize on restart - succeeds
Minimize on click close menu item in file menu - succeeds
Minimize on press ctrl w key - succeeds
Minimize on press esc key - succeeds

Minimize on click X button - fails

As far as I know, there is no solution since the close event doesn't fire correctly.
Hello morat,
merci pour le retour.
Pour moi, c'est identique:
Minimize on start - Ok
Minimize on restart - Ok
Minimize on click close menu item in file menu -Ok
Minimize on press ctrl w key - pas essayé
Minimize on press esc key - pas essayé

Minimize on click X button - Non .
C'est une question d'habitude.
Merci beaucoup pour ta communication
User avatar
cricri13
Posts: 22
Joined: May 14th, 2005, 5:11 am
Location: Marseille (France)

Re: Thunderbird 60 / Addon Compatibility

Post by cricri13 »

Hello,
J'ai enfin trouvé comment faire fonctionner,
Minimize on click X button = OK.
Après avoir installé l'extension Minimize On Start and Close 1.3.2.2 (avec les modifications de morat)
j'ai aussi installé Minimize To Tray Reanimated 1.4.11
Mais comme le menu n’apparaît plus, je vais dans about config
ligne extensions.mintrayr.minimizeon
et modifier la valeur en mettant 3
0 = Never
1 = When minimizing
2 = Instead of closing
3 = Instead of closing and when minimizing

Et tout est Ok à la fermeture.
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

Fix for AutoUp in Thunderbird 60: http://forums.mozillazine.org/viewtopic ... #p14814392

Fix for AutoUp in Thunderbird 68:

* manifest.json (create manifest.json file in folder with install.rdf file)

Code: Select all

{
  "manifest_version": 2,
  "applications": {
    "gecko": {
      "id": "AutoUp@luc.pastisman",
      "strict_min_version": "68.0"
    }
  },
  "name": "AutoUp",
  "description": "Transform the first letter of a sentence in uppercase",
  "version": "1.03.1",
  "icons": {
    "32": "icon.png"
  },
  "legacy": {
    "type": "xul"
  }
}
note: copy icon.png file in AutoUp.jar archive to folder with install.rdf file

I didn't rewrite the AutoUp options window.

You can use the about:config window to modify the preferences.

[uncheck] Insert a dot before a carriage return -> extensions.autoup.poincr pref (default false)
[check] Uppercase after a carriage return -> extensions.autoup.majcr pref (default true)

AutoUp
http://addons.thunderbird.net/thunderbird/addon/368166

Changes in Thunderbird 61-68
http://developer.thunderbird.net/add-ons/tb68/changes
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

Fix for Return Receipt Toolbar Button in Thunderbird 68:

* manifest.json (create manifest.json file in folder with install.rdf file)

Code: Select all

{
  "manifest_version": 2,
  "name": "Return Receipt Toolbar Button",
  "description": "Adds a Return Receipt button to mail composition window toolbar.",
  "version": "0.20.1",
  "author": "Leszek Zyczkowski",
  "icons": {
    "32": "chrome/skin/icon.png",
    "64": "chrome/skin/icon64.png"
  },
  "legacy": {
    "type": "xul"
  },
  "applications": {
    "gecko": {
      "id": "return@teozyczkowski.pl",
      "strict_min_version": "68.0"
    }
  }
}
* install.rdf

Code: Select all

- <em:version>0.20</em:version>
+ <em:version>0.20.1</em:version>

Code: Select all

- <em:maxVersion>38.0</em:maxVersion>
+ <em:maxVersion>68.*</em:maxVersion>
* chrome.manifest

Code: Select all

  style chrome://messenger/content/messengercompose/messengercompose.xul chrome://return/skin/overlay.css
+ style chrome://messenger/content/customizeToolbar.xul chrome://return/skin/overlay.css
* chrome\content\return.js

Code: Select all

- document.persist(toolBar.id, "currentset");
+ Services.xulStore.persist(toolBar, "currentset");

Code: Select all

- var reopen = gComposeRecyclingListener.onReopen;
- gComposeRecyclingListener.onReopen = function ReturnReceipt_onReopenWrapper(params) {
- reopen(params);

- var toolbarbutton = document.getElementById('return-button');
- toolbarbutton.setAttribute('checked', gMsgCompose.compFields.returnReceipt);
- }
Return Receipt Toolbar Button
http://addons.thunderbird.net/thunderbird/addon/6038

Changes in Thunderbird 61-68
http://developer.thunderbird.net/add-on ... 68/changes

Remove vestiges of compose window recycling
http://bugzilla.mozilla.org/show_bug.cgi?id=777732
fibrolan
Posts: 146
Joined: January 29th, 2018, 8:10 pm

Re: Thunderbird 60 / Addon Compatibility

Post by fibrolan »

good Morning
does anyone have a fix for Autoup for Thunderbird 78 version ?
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

@fibrolan

AutoUp needs to be completely rewritten for Thunderbird 78.

AutoUp
http://addons.thunderbird.net/thunderbird/addon/368166

I couldn't find a similar extension.

Finding extensions that support Thunderbird 78
http://forums.mozillazine.org/viewtopic ... &t=3063942
fibrolan
Posts: 146
Joined: January 29th, 2018, 8:10 pm

Re: Thunderbird 60 / Addon Compatibility

Post by fibrolan »

Thanks for the reply. Is there anything similar that would do the same thing. I miss having to remember to capitalize and this app had my back.
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

@fibrolan

You could use the userChromeJS extension to add the AutoUp listener. (for advanced users only)

Code: Select all

/* Thunderbird userChrome.js */

// Thunderbird 68 uses the messengercompose.xul page.
// Thunderbird 78 uses the messengercompose.xhtml page.

(function () {
  if (location == "chrome://messenger/content/messengercompose/messengercompose.xul" ||
      location == "chrome://messenger/content/messengercompose/messengercompose.xhtml") {
    setTimeout(function () {
      try {
        var AutoUp = {
          ModifyKey: function(event) {
            var doc = document.getElementById("content-frame").contentDocument;
            var LeNoeu = doc.getSelection().anchorNode;
            if ((event.charCode == 46) || (event.keyCode == 8) || event.altKey || event.ctrlKey || event.metaKey) return;
            if ( true /* extensions.autoup.poincr */ && (event.keyCode == 13) && (LeNoeu.nodeName == "#text")) {
              var jnc = doc.getSelection().anchorOffset - 1;
              var LeText = LeNoeu.textContent;
              while ((jnc > 0) && ((LeText.charCodeAt(jnc) == 32) || (LeText.charCodeAt(jnc) == 160))) {
                jnc = jnc - 1;
                var keyEvt = document.createEvent("KeyboardEvent");
                if (keyEvt.initKeyEvent) {
                  var tgt = event.target;
                  keyEvt.initKeyEvent("keypress", true, true, null, false, false, false, false, 8, 0);
                  tgt.dispatchEvent(keyEvt);
                  keyEvt.stopPropagation;
                }
              }
              if (((LeText.charCodeAt(jnc) >=  48) && (LeText.charCodeAt(jnc) <=  57)) ||
                  ((LeText.charCodeAt(jnc) >=  65) && (LeText.charCodeAt(jnc) <=  90)) ||
                  ((LeText.charCodeAt(jnc) >=  97) && (LeText.charCodeAt(jnc) <= 122)) ||
                  ((LeText.charCodeAt(jnc) >= 224) && (LeText.charCodeAt(jnc) <= 255))) {
                var keyEvt = document.createEvent("KeyboardEvent");
                if (keyEvt.initKeyEvent) {
                  var tgt = event.target;
                  keyEvt.initKeyEvent("keypress", true, true, null, false, false, false, false, 0, 46);
                  tgt.dispatchEvent(keyEvt);
                  keyEvt.stopPropagation;
                }
              }
            }
            if ((event.charCode >= 65) && (event.charCode <= 90)) return;
            if ((event.altKey) || (event.metaKey)) return;
            if (((event.charCode >=  97) && (event.charCode <= 122)) ||
                ((event.charCode >= 224) && (event.charCode <= 255))) {
              if (((LeNoeu.nodeName != "#text") && ( true /* extensions.autoup.majcr */ )) ||
                  (doc.getSelection().anchorOffset == 0)) {
                var tgt = event.target;
                event.preventDefault(true);
                event.stopPropagation(true);
                AutoUp.substituteChar(String.fromCharCode(event.charCode).toUpperCase().charCodeAt(0), tgt);
              } else if (LeNoeu.nodeName == "#text") {
                var inc = doc.getSelection().anchorOffset - 1;
                var LeText = LeNoeu.textContent;
                while ((inc > 0) && ((LeText.charCodeAt(inc) == 32) || (LeText.charCodeAt(inc) == 160))) inc--;
                if ((LeText.charAt(inc) == '.') || (LeText.charAt(inc) == '?') || (LeText.charAt(inc) == '!')) {
                  var tgt = event.target;
                  event.preventDefault(true);
                  event.stopPropagation(true);
                  AutoUp.substituteChar(String.fromCharCode(event.charCode).toUpperCase().charCodeAt(0), tgt);
                }
              }
            }
          },
          substituteChar: function(charCode, tgt) {
            var keyEvt = document.createEvent("KeyboardEvent");
            if (keyEvt.initKeyEvent) {
              keyEvt.initKeyEvent("keypress", true, true, null, false, false, false, false, 0, charCode);
              tgt.dispatchEvent(keyEvt);
              keyEvt.stopPropagation;
            }
          },
        };
        document.getElementById("content-frame").contentDocument.addEventListener("keypress", AutoUp.ModifyKey, false);
      } catch (e) {
        Components.utils.reportError(e); // [check] Show Content Messages
      }
    }, 1000);
  }
})();
userChromeJS by jikamens (compatible with TB 68 and TB 78)
http://addons.thunderbird.net/thunderbird/addon/986610

Instructions:

1. install userChromeJS extension
2. close email client
3. create or edit the userChrome.js file in the chrome folder
4. open email client
DaveRo
Posts: 69
Joined: May 9th, 2008, 10:00 pm

Re: Thunderbird 60 / Addon Compatibility

Post by DaveRo »

The fix posted in the comment here seems to work too
https://addons.thunderbird.net/en-GB/th ... s/1157224/

Curiously, despite being programmed to deal with accented Latin characters, e.g. change é to É (and being written by a Frenchman) this doesn't work for me.
My guess is that my method of keying them - using AltGr deadkeys on Linux - prevents the event firing.
(Using TB 86.0b2.)

Does it work if you have a local keyboard?
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: Thunderbird 60 / Addon Compatibility

Post by morat »

I have a standard QWERTY keyboard, not a local keyboard.

Code: Select all

alert("é".charCodeAt(0)); // 233
233 is in the charCode range. A local keyboard should work correctly.
Post Reply