Skip to content

Instantly share code, notes, and snippets.

@btpoe
Created January 15, 2018 21:45
Show Gist options
  • Save btpoe/6fef297446329b78030e0fcff84358ce to your computer and use it in GitHub Desktop.
Save btpoe/6fef297446329b78030e0fcff84358ce to your computer and use it in GitHub Desktop.
Typekit.load({async:true,active:function() {
Array.prototype.some.call(document.head.children, function (node) {
if (node.tagName === 'STYLE' && node.innerHTML.indexOf('typekit.net') > -1 && node.innerHTML.indexOf('@font-face') > -1) {
window.localStorage.setItem('ts.fontFace', node.innerHTML);
return true;
}
return false;
});
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment