Last active
March 20, 2019 10:50
-
-
Save brendanmoore/0590a2ddae31ea6185e8cb1a405ecf7c to your computer and use it in GitHub Desktop.
Log @font-face rules for page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i=0;i<document.styleSheets.length;i++) { | |
console.group(document.styleSheets[i].href); | |
for (var j=0;j<document.styleSheets[i].cssRules.length;j++) | |
{ | |
var rule =document.styleSheets[i].cssRules[j]; | |
if (rule instanceof CSSFontFaceRule) { | |
console.log(rule.cssText); | |
} | |
} | |
console.groupEnd(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment