Remove styles snippet
Removes all of the styles from a page
var sheetsAndStyles = $$('link[rel=stylesheet],style') for(var i = 0; i < sheetsAndStyles.length; i++) { var elem = sheetsAndStyles[i] elem.parentNode.removeChild(elem) } var all = document.all for(var i = 0; i < all.length; i++) { var el = all[i] if(el.getAttribute('style') != null) { el.removeAttribute('style') } } function $$(selector, rootNode) { rootNode = rootNode || document return rootNode.querySelectorAll(selector) }