Get Used CSS Bookmarklet

This bookmarklet lets you extract only the CSS that is actually used by a web page. This can be helpful when you want to develop portable static pages, or if you want to reduce the size of CSS files.

Source (www.pontikis.net)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3Afunction%20mq%28n%2Ct%29%7Bvar%20i%2Cr%3Breturn%20n%3D%3D%3D%22root%22%3F%28i%3D0%2Cr%3D1%29%3At%3D%3D%3D%22root%22%3F%28i%3D1%2Cr%3D0%29%3A%28i%3D+n.replace%28/%5CD/g%2C%22%22%29%2Cr%3D+t.replace%28/%5CD/g%2C%22%22%29%2Cn.indexOf%28%22max-%22%29%3E-1%26%26%28i*%3D-1%29%2Ct.indexOf%28%22max-%22%29%3E-1%26%26%28r*%3D-1%29%29%2Ci%3D%3D%3Dr%3F0%3Ai%3Cr%3F-1%3A1%7D%28function%28%29%7Bvar%20i%3Ddocument%2Cv%2Cr%2Cu%3D%7Broot%3A%22%22%7D%2Cc%2Cy%3Di.styleSheets%2Cw%3D/%5C%7B.+%3F%5C%7D%24/%2Cf%2Ca%2Cs%2Ce%2Cn%2Cp%3Bif%28y.length%29%7Bfor%28e%3D0%3Be%3Cy.length%3B++e%29if%28c%3Dy%5Be%5D.cssRules%2Cc%26%26c.length%29for%28a%3D0%3Ba%3Cc.l[email protected][email protected][email protected][email protected][email protected][email protected][email protected][email protected]ndexOf%28%22@%22%29%3D%3D%3D0%7C%7Ci.querySelector%28f.replace%28w%2C%22%22%29%29%29%26%26%28u.root+%3Df+%22%5Cn%22%29%3Bv%3DObject.keys%28u%29.sort%28mq%29%3Bvar%20l%3Di.createElement%28%22DIV%22%29%2Co%3Dl.style%2Ch%3Di.createElement%28%22TEXTAREA%22%29%2Ct%3Dh.style%3Bfor%28o.position%3D%22fixed%22%2Co.top%3D%220%22%2Co.left%3D%220%22%2Co.width%3D%22100%25%22%2Co.height%3D%22100%25%22%2Co.background%3D%22%23000%22%2Co.opacity%3D%220.8%22%2Co.zIndex%3D%229999%22%2Ct.position%3D%22fixed%22%2Ct.top%3D%220%22%2Ct.bottom%3D%220%22%2Ct.left%3D%220%22%2Ct.right%3D%220%22%2Ct.width%3D%2290%25%22%2Ct.height%3D%2290%25%22%2Ct.margin%3D%22auto%22%2Ct.whiteSpace%3D%22nowrap%22%2Ct.zIndex%3D%229999%22%2Cl.appendChild%28h%29%2Cl.onclick%3Dfunction%28%29%7Bdelete%20i.body.removeChild%28h%29%3Bdelete%20i.body.removeChild%28l%29%7D%2Ch.onfocus%3Dfunction%28%29%7Bthis.select%28%29%7D%2Ce%3D0%3Be%3Cv.length%3B++e%29n%3Dv%5Be%5D%2Cu%5Bn%5D%3F%28p%3Dn%3D%3D%3D%22root%22%2Ch.value+%3D%28p%3F%22%22%3An+%22%20%7B%5Cn%22%29+u%5Bn%5D+%28p%3F%22%22%3A%22%7D%5Cn%22%29%29%3Adelete%20u%5Bn%5D%3Bi.body.appendChild%28l%29%3Bi.body.appendChild%28h%29%7D%7D%29%28%29%3B


Rate it:


Tags:

Comments

Comments so far. Add yours.