Skip to content

Instantly share code, notes, and snippets.

@ivan
Last active July 13, 2016 03:15
Show Gist options
  • Save ivan/db1fe6aadab41352ef497777b5f82a28 to your computer and use it in GitHub Desktop.
Save ivan/db1fe6aadab41352ef497777b5f82a28 to your computer and use it in GitHub Desktop.
Userscript to fix fonts on elixir-lang.org, normalizing font sizes in Getting Started and /docs/
// ==UserScript==
// @name Fix fonts sizes on elixir-lang.org
// @namespace elixirfonts
// @include *://elixir-lang.org/*
// @version 1
// @grant none
// ==/UserScript==
var styles = `
body, .content-inner {
/* Fix: font sizes on homepage and Getting Started are much smaller than in /docs/ */
font: 1em sans-serif !important;
/* Fix: lack of line-height on homepage and Getting Started */
line-height: 150% !important;
}
body, code {
/* Override #555 */
color: #000 !important;
}
`;
var newSS = document.createElement('link');
newSS.rel = 'stylesheet';
newSS.href = 'data:text/css,' + escape(styles);
document.getElementsByTagName("head")[0].appendChild(newSS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment