I use Greasemonkey to replace text in webpages. I'd like to do the same in Mail, you know for something like for my RSS feeds:
https://xkcd.com/1288/
However while it works just fine in webpages it does not in Mail.
Is it possible to do what I want to do, with Greasemonkey or another way?
Possible to use Greasemonkey in Mail?
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: Possible to use Greasemonkey in Mail?
I could use the userChromeJS addon to replace message text in Thunderbird. Maybe you could do something similar in SeaMonkey.
userChromeJS by jikamens
http://addons.thunderbird.net/thunderbird/addon/986610
Instructions:
* install userChromeJS extension
* close email client
* create or edit the userChrome.js file in the chrome folder
* open email client
I can run userChrome.js using the autoconfig feature, but it's more complicated than using the addon.
Code: Select all
/* Thunderbird userChrome.js */
(function () {
if (location == "chrome://messenger/content/messenger.xul" ||
location == "chrome://messenger/content/messenger.xhtml") {
setTimeout(function () {
try {
var browser = document.getElementById("messagepane");
browser.addEventListener("load", function () {
var message = gFolderDisplay.selectedMessage;
if (message) {
var body = content.document.body;
body.innerHTML = body.innerHTML.replace(/Hello/g, "XXX");
}
}, true);
} catch (e) {
Components.utils.reportError(e);
};
}, 1000);
}
})();
http://addons.thunderbird.net/thunderbird/addon/986610
Instructions:
* install userChromeJS extension
* close email client
* create or edit the userChrome.js file in the chrome folder
* open email client
I can run userChrome.js using the autoconfig feature, but it's more complicated than using the addon.