Created
September 7, 2015 03:30
-
-
Save felquis/8db54632b49c2830d466 to your computer and use it in GitHub Desktop.
pt-BR: Remove todos os estilos de uma página
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
var styles = document.querySelectorAll('link[href$=".css"]') | |
styles = nodeListToArray(styles) | |
function nodeListToArray(nodeList) { | |
return Array.prototype.slice.call(nodeList) | |
} | |
function removeNode(node) { | |
node.parentElement.removeChild(node) | |
} | |
styles.forEach(removeNode); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment