Created
December 30, 2017 09:33
-
-
Save RichardDillman/a64fd8001ca36e41f4edb5a007f9fa13 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 hidden or 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