Thunderbird 60 / Addon Compatibility
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
Can someone send me the installation version as I do not know how to edit the file to make it work by adding code.
my Thunderbird version is 78.7.1
Thanks
Robert
my Thunderbird version is 78.7.1
Thanks
Robert
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
@fibrolan
Do you know how to create the <profile_directory>\chrome\userChrome.css file?
You don't need to install the AutoUp addon or edit the autoup-1.03-tb.xpi file.
The userChromeJS addon uses the <profile_directory>\chrome\userChrome.js file.
Instructions: http://forums.mozillazine.org/viewtopic ... #p14879124
Do you know how to create the <profile_directory>\chrome\userChrome.css file?
You don't need to install the AutoUp addon or edit the autoup-1.03-tb.xpi file.
The userChromeJS addon uses the <profile_directory>\chrome\userChrome.js file.
Instructions: http://forums.mozillazine.org/viewtopic ... #p14879124
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
Good Morning!
I am trying to follow the instruction on the AutoUP Listener using userchromeJS. I am having a bit of an issue.
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
in point #3 create the file in chrome folder. I will assume it goes here C:\Program Files (x86)\Mozilla Thunderbird\chrome
my issue is in this folder, it only allows me to create a folder and not a file name. How do I create the Userchrome.js file ?
I know the question sounds stupid but I appreciate the help.
Robert
I am trying to follow the instruction on the AutoUP Listener using userchromeJS. I am having a bit of an issue.
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
in point #3 create the file in chrome folder. I will assume it goes here C:\Program Files (x86)\Mozilla Thunderbird\chrome
my issue is in this folder, it only allows me to create a folder and not a file name. How do I create the Userchrome.js file ?
I know the question sounds stupid but I appreciate the help.
Robert
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
The "Mozilla Thunderbird" folder is the installation folder, not the profile folder.fibrolan wrote:assume it goes here C:\Program Files (x86)\Mozilla Thunderbird\chrome
Installation folder
http://kb.mozillazine.org/Installation_directory
Profile folder
http://kb.mozillazine.org/Profile_folder
Check if the userChrome.js file is really in the chrome folder in the correct profile folder.
Thunderbird > Menu Bar > Help > Troubleshooting Information > Profile Folder > Open Folder
The userChrome.js file name is case sensitive. Windows hides file extensions by default. Novice users may end up mistakingly naming the file userChrome.js.txt without realizing it.
Also make sure that file is a plain text file without formatting or a BOM (byte order mark). You can open the file in a Firefox tab as a test.
You can create the plain text file with Microsoft Notepad using ANSI encoding.
Remember you must restart the application for the changes to take effect.
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
OK, I followed the Instructions.
here is where I put the JS file
C:\ProgramData\Mozilla\updates\8216C80C92C4E828
Here are the file in the directory
userChrome.js I save it as ansi and copied the coding from post 4249 into this file.
morat
Posts: 4249
Joined: February 3rd, 2009, 9:29 pm
Post Posted November 26th, 2020, 9:59 pm
@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
Something is still wrong as I cannot get capitals to work. Am I using the code for the file ?
thanks
Robert
here is where I put the JS file
C:\ProgramData\Mozilla\updates\8216C80C92C4E828
Here are the file in the directory
userChrome.js I save it as ansi and copied the coding from post 4249 into this file.
morat
Posts: 4249
Joined: February 3rd, 2009, 9:29 pm
Post Posted November 26th, 2020, 9:59 pm
@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
Something is still wrong as I cannot get capitals to work. Am I using the code for the file ?
thanks
Robert
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
That alphanumeric folder is the update folder, not the profile folder.fibrolan wrote:here is where I put the JS file C:\ProgramData\Mozilla\updates\8216C80C92C4E828
Thunderbird > Menu Bar > Help > Troubleshooting Information > Update Folder > Open Folder
Thunderbird > Menu Bar > Help > Troubleshooting Information > Profile Folder > Open Folder (click here)
Remember to create the chrome folder in the profile folder.
i.e. <profile_folder>\chrome\userChrome.js
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
I figured it out. I put the file in the updated folder and not in the profile folder. All seems to work now.
Thanks
Beside the code above, is there any other code I need to put into this file ??
Thanks
Beside the code above, is there any other code I need to put into this file ??
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
So the AutoUp features work now in the compose window?
There is no other code. The hack doesn't use the AutoUp preferences.
* Insert a dot before a carriage return (extensions.autoup.poincr preference)
* Uppercase after a carriage return (extensions.autoup.majcr preference)
The AutoUp options are set to enabled in the code.
There is no other code. The hack doesn't use the AutoUp preferences.
* Insert a dot before a carriage return (extensions.autoup.poincr preference)
* Uppercase after a carriage return (extensions.autoup.majcr preference)
The AutoUp options are set to enabled in the code.
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
It works like a charm. Thanks for all the help. Can i uninstall the Autoup addon in Thunderbird ?
Thanks again
Thanks again
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
@fibrolan
You can remove the AutoUp addon in the Addons Manager.
You're welcome.
You can remove the AutoUp addon in the Addons Manager.
You're welcome.
-
- Posts: 146
- Joined: January 29th, 2018, 8:10 pm
Re: Thunderbird 60 / Addon Compatibility
Thanks for the help.
Is there a way to have the code capitalize the word "I" when typing ?
Is there a way to have the code capitalize the word "I" when typing ?
-
- Posts: 6429
- Joined: February 3rd, 2009, 6:29 pm
Re: Thunderbird 60 / Addon Compatibility
@fibrolan
There is no simple solution for the feature.
mms Auto Correct (obsolete)
http://addons.thunderbird.net/thunderbird/addon/430090
There is no simple solution for the feature.
mms Auto Correct (obsolete)
http://addons.thunderbird.net/thunderbird/addon/430090