Created
December 30, 2017 09:19
-
-
Save rdillmanCN/cd4d071e161d9605d86fdb82b563d983 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