Skip to content

Instantly share code, notes, and snippets.

View dansajin's full-sized avatar

Dan Sajin dansajin

View GitHub Profile
dansajin / criticalcss.js
Last active May 3, 2019 09:34 — forked from scottjehl/criticalcss.js
critical CSS devtool snippet
* criticalCSS by @dansajin. based on @scottjehl's criticalcss.js
* run this in a browser console or create a bookmarklet.
* lists rules per css file.
* does not include cross origin css files and inline css.
var sheets = document.styleSheets,
host =,
maxTop = 1200,