Skip to content

Instantly share code, notes, and snippets.

@kadamwhite
Last active June 19, 2017 15:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kadamwhite/4723443 to your computer and use it in GitHub Desktop.
Save kadamwhite/4723443 to your computer and use it in GitHub Desktop.
Bookmarklet to convert all text on a webpage to the Blokk font, for use when working on mockups in your browser.
(function() {
var css = "*{font-family:\"Blokk Regular\", blokk !important;}",
head = document.getElementsByTagName("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 );
})();
// Copy into a bookmarklet by prepending the below with "javascript:"
javascript:(function(){var e='*{font-family:"Blokk Regular", blokk !important;}',t=document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)})();
@kadamwhite
Copy link
Author

Updated to reflect the change of the font's name from "Blokk" to "BLOKK Regular"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment