Skip to content

Instantly share code, notes, and snippets.

@dstillman
dstillman / userChrome.js
Last active Nov 28, 2019
Thunderbird: Open Message URL
View userChrome.js
// Install https://github.com/jikamens/userChromeJS and save this as chrome/userChrome.js in your TB profile directory
window.addEventListener('keydown', function (event) {
if (event.metaKey && event.ctrlKey && event.key == 'o') {
var loadFirstURLInBody = function (body) {
var parser = new DOMParser();
var doc = parser.parseFromString(body, "text/html");
var links = doc.getElementsByTagName('a');
if (links.length) {
let uri = Services.io.newURI(links[0].href, null, null);