Created
December 9, 2011 14:13
-
-
Save flashingpumpkin/1451672 to your computer and use it in GitHub Desktop.
Gmail Monospace Font
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
css = """ | |
div.Bk { | |
font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
} | |
textarea { | |
font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
} | |
td > div { | |
font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
} | |
""" | |
try | |
head = document.getElementsByTagName("head")[0] | |
node = document.createElement "style" | |
node.type = "text/css"; | |
node.appendChild document.createTextNode css | |
head.appendChild node | |
catch err | |
try | |
console.log "Error applying GMail style: " | |
console.log err | |
console.log err.stack | |
catch err | |
# pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @name Gmail/Google Groups Monospace | |
// @namespace http://owns.ch | |
// @description Make emails and textareas in Gmail/Google Groups monospace | |
// @author Alen Mujezinovic | |
// @homepage http://gist.github.com/1451672 | |
// @match https://mail.google.com/* | |
// @match https://groups.google.com/* | |
// @run-at document-start | |
(function() { | |
var css, head, node; | |
css = "div.Bk {\n font-family: DejaVu Sans Mono, Courier, Monospace !important;\n}\ntextarea {\n font-family: DejaVu Sans Mono, Courier, Monospace !important;\n}\ntd > div {\n font-family: DejaVu Sans Mono, Courier, Monospace !important; \n}"; | |
try { | |
head = document.getElementsByTagName("head")[0]; | |
node = document.createElement("style"); | |
node.type = "text/css"; | |
node.appendChild(document.createTextNode(css)); | |
head.appendChild(node); | |
} catch (err) { | |
try { | |
console.log("Error applying GMail style: "); | |
console.log(err); | |
console.log(err.stack); | |
} catch (err) { | |
} | |
} | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install, click on the raw link on the javascript file. Enjoy.