Created
October 1, 2020 18:44
-
-
Save signaes/07ec80c26b25b88b06b31ccf9db4fbe5 to your computer and use it in GitHub Desktop.
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
[].slice.call(document.querySelectorAll('*')) | |
.reduce((acc, x) => acc = x.getAttribute('class') ? acc.concat(x.getAttribute('class')) : acc, []) | |
.reduce((acc, x) => { | |
x.split(' ').forEach(c => { | |
if (acc.indexOf(c) === -1) { | |
acc.push(c); | |
} | |
}); | |
return acc; | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment