Skip to content

Instantly share code, notes, and snippets.

@emanamini
Last active November 30, 2016 09:18
Show Gist options
  • Save emanamini/7ff965c87bc411ad5b38952e5e1d4ff0 to your computer and use it in GitHub Desktop.
Save emanamini/7ff965c87bc411ad5b38952e5e1d4ff0 to your computer and use it in GitHub Desktop.
Change the whole pages' font into something fancy
// ==UserScript==
// @name MeFirefox
// @namespace MyDebian
// @description Change All fonts across FF
// @include http*
// @version 1
// @grant none
// ==/UserScript==
var css = "h1, h2, h3, h4, h5, h6, #firstHeading,.pod_body, #lst-ib, td, body, html, p, tr, div, a, main-body, textarea {font-family: IRANSansWebNoEn, DroidSans, sans-serif !important;} strong, b {font-weight: 900;}",
head = document.head || document.getElementByTagName("head")[0],
style = document.createElement("style");
style.type = "text/css";
if (style.styleSheet){
style.stylesheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment