Skip to content

Instantly share code, notes, and snippets.

@rmmh
Created July 11, 2016 23:46
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 rmmh/35eed4a7fab23084840b443338193e97 to your computer and use it in GitHub Desktop.
Save rmmh/35eed4a7fab23084840b443338193e97 to your computer and use it in GitHub Desktop.
Github recently changed their default text font. This restores it to the previous settings -- Helvetica is prettier than Ubuntu Sans on Linux.
// ==UserScript==
// @name Github Helvetica
// @namespace http://userstyles.org
// @description Github recently changed their default text font. This restores it to the previous settings -- Helvetica is prettier than Ubuntu Sans on Linux.
// @author Ryan Hitchman
// @homepage https://userstyles.org/styles/130086
// @match https://github.com/*
// @match https://*.github.com/*
// @run-at document-start
// @version 0.20160711225447
// ==/UserScript==
(function() {var css = [
"body,.markdown-body,.intgrs-page .main-content,.blog-content,.migration-wrapper,.migrate-owners-wrapper,.setup-wrapper,.showcase-page-title,.tooltipped::after {",
" font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";",
"}"
].join("\n");
if (typeof addStyle != "undefined") {
addStyle(css);
} else {
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