Created
October 29, 2019 18:15
-
-
Save neodigm/64a200499a97cd7967997be85334bc1f to your computer and use it in GitHub Desktop.
Remove all Bootstrap CSS from a page. Useful for Tailwind migration testing. Vanilla JavaScript ES5.
This file contains hidden or 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 eSS = document.querySelectorAll('link[rel=stylesheet]'); | |
for(var i=0;i<eSS.length;i++){ | |
if( typeof eSS[i].href != "undefined" ){ | |
if( eSS[i].href.indexOf("bootstrap") != -1 ){ | |
eSS[i].parentNode.removeChild(eSS[i]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment