Last active
August 29, 2015 14:19
-
-
Save nunull/ae920c004f7ac99e321c to your computer and use it in GitHub Desktop.
Remove all Styles from a Website.
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
javascript:var links=document.getElementsByTagName('link');for(var i=0,j=links.length;i<j;i++){if(links[i]&&links[i].rel==='stylesheet')links[i].parentElement.removeChild(links[i]); }var styles=document.getElementsByTagName('style');for(var i=0,j=styles.length;i<j;i++){if(styles[i])styles[i].parentElement.removeChild(styles[i]);} |
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 links = document.getElementsByTagName('link'); | |
for(var i = 0, j = links.length; i < j; i++) { | |
if(links[i] && links[i].rel === 'stylesheet') | |
links[i].parentElement.removeChild(links[i]); | |
} | |
var styles = document.getElementsByTagName('style'); | |
for(var i = 0, j = styles.length; i < j; i++) { | |
if(styles[i]) | |
styles[i].parentElement.removeChild(styles[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment