Skip to content

Instantly share code, notes, and snippets.

@artizirk
Created April 18, 2019 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artizirk/7ae4cf3e201559240d00e6b3b070bc4f to your computer and use it in GitHub Desktop.
Save artizirk/7ae4cf3e201559240d00e6b3b070bc4f to your computer and use it in GitHub Desktop.
Fastmail monospace mail font
// ==UserScript==
// @name fastmail monospace
// @namespace http://zirk.me/userscript
// @version 0.1
// @description try to take over the world!
// @author Arti
// @match https://www.fastmail.com/mail/*
// @grant none
// ==/UserScript==
(function() {
var css = [
"pre.u-article {",
" font-family: monospace;",
"}",
"",
"textarea.v-Text-input {",
" font-family: monospace;",
"}"
].join("\n");
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment