Is there a way to suppress all modal dialogs that originate from thunderbird,
like SMTP error notifications etc.
They're really irritating and prevent following outbox messages to be sent, because when dialog box appears it stops other mail from being sent until you click okay.
Thanks
Mute/disable all the error notifications
-
- Posts: 28
- Joined: April 5th, 2017, 2:15 am
- tanstaafl
- Moderator
- Posts: 49647
- Joined: July 30th, 2003, 5:06 pm
Re: Mute/disable all the error notifications
Not that I'm aware of.
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: Mute/disable all the error notifications
You would need to rebuild the application to suppress the alerts.
Similar thread: http://forums.mozillazine.org/viewtopic ... &t=3037820
I guess a developer could automatically close the alerts after a few seconds with the userChrome.js file.
Similar thread: http://forums.mozillazine.org/viewtopic ... &t=3037820
I guess a developer could automatically close the alerts after a few seconds with the userChrome.js file.
-
- Posts: 28
- Joined: April 5th, 2017, 2:15 am
Re: Mute/disable all the error notifications
Any idea how to accomplish that with .js plugin?
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: Mute/disable all the error notifications
*** for advanced users only ***
There are multiple types of alerts.
Example 1...
window url: chrome://global/content/alerts/alert.xul
window title: Thunderbird
window description: Failed to connect to server imap.googlemail.com.
Example 2...
window url: chrome://global/content/commonDialog.xul
window title: Send Message Error
window description:
I got a test dialog similar to the "Send Message Error" dialog to open in the 3pane window with the following code.
Similar thread: http://forums.mozillazine.org/viewtopic ... &t=3011729
There are multiple types of alerts.
Example 1...
window url: chrome://global/content/alerts/alert.xul
window title: Thunderbird
window description: Failed to connect to server imap.googlemail.com.
Example 2...
window url: chrome://global/content/commonDialog.xul
window title: Send Message Error
window description:
I got the second type of alert to automatically close after 5 seconds with the following code. I tested it using the error console.Sending of the message failed.
An error occurred while sending mail: Outgoing server (SMTP) smtp.googlemail.com is unknown. The server may be incorrectly configured. Please verify that your Outgoing server (SMTP) settings are correct and try again.
Code: Select all
/* Thunderbird userChrome.js */
(function () {
if (location == "chrome://messenger/content/messenger.xul") {
var observer = {
id: "userChromeJS_observer_1",
get wrappedJSObject() {
return this;
},
observe: function onOpen(subject, topic, data) {
// console.log("subject: " + subject);
// console.log("topic: " + topic);
// console.log("data: " + data);
// console.log("uri: " + subject.document.documentURI);
if (topic == "domwindowopened" &&
subject instanceof Components.interfaces.nsIDOMWindow) {
subject.addEventListener("DOMContentLoaded", function onLoad() {
subject.removeEventListener("DOMContentLoaded", onLoad, false);
if (subject.document.documentURI == "chrome://global/content/commonDialog.xul") {
// Services.ww.unregisterNotification(observer);
// Services.wm.getMostRecentWindow("mail:3pane").inspectObject(subject); // DOM Inspector
// console.log("uri: " + subject.document.documentURI);
subject.setTimeout(function () { subject.close(); }, 5000);
}
}, false);
}
},
};
var initialized = false;
var enumerator = Services.obs.enumerateObservers("domwindowopened");
while (enumerator.hasMoreElements()) {
var element = enumerator.getNext();
if ("wrappedJSObject" in element && element.wrappedJSObject &&
element.wrappedJSObject.id == observer.id) {
initialized = true;
break;
}
}
if (initialized == false) {
Services.ww.registerNotification(observer);
}
}
})();
Code: Select all
Services.prompt.alert(window, "title", "description");
-
- Posts: 28
- Joined: April 5th, 2017, 2:15 am
Re: Mute/disable all the error notifications
how to use it within Thunderbird afterwards, and what compilator to use to paste code in?
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: Mute/disable all the error notifications
Instructions:
* install userChromeJS extension
* close email client
* create or edit the userChrome.js file in the chrome folder
* open email client with the -purgecaches command line option
i.e.
thunderbird.exe -purgecaches
ThunderbirdPortable.exe -purgecaches
You have to purge the javascript caches only after creating or editing the userChrome.js file.
http://userchromejs.mozdev.org/
http://userchromejs.mozdev.org/faq.html
Also, I believe userChromeJS 2.0 has a bug in Thunderbird 57 and above.
More info: http://forums.mozillazine.org/viewtopic ... #p14783122
* install userChromeJS extension
* close email client
* create or edit the userChrome.js file in the chrome folder
* open email client with the -purgecaches command line option
i.e.
thunderbird.exe -purgecaches
ThunderbirdPortable.exe -purgecaches
You have to purge the javascript caches only after creating or editing the userChrome.js file.
http://userchromejs.mozdev.org/
http://userchromejs.mozdev.org/faq.html
Also, I believe userChromeJS 2.0 has a bug in Thunderbird 57 and above.
More info: http://forums.mozillazine.org/viewtopic ... #p14783122