Created
April 1, 2024 17:10
-
-
Save rbk/04f357422f751fdd0f296a09052d177d to your computer and use it in GitHub Desktop.
Remove all CSS styles from the DOM
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
Array.from(document.querySelectorAll('style, link')).map(x => x.remove()); | |
Array.from(document.querySelectorAll('*')).map(x => { | |
x.setAttribute('stlye', "") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment