Created
December 5, 2017 21:54
-
-
Save rdillmanCN/95cac070f3c4418018989fcdf2b5eebe to your computer and use it in GitHub Desktop.
List all style blocks and sheets used within the page, and output to the console.
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
(function() { | |
var tab = [].slice.call(document.styleSheets).map(function(e) { | |
return { | |
size: e.cssRules.length / 1e3 + " kb", | |
url: e.href || "Block" | |
} | |
}); | |
console.group("CSS Data"); | |
console.table(tab); | |
console.groupEnd("CSS Data"); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment