Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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)})();
Copy link

kadamwhite commented Mar 3, 2013

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