Skip to content

Instantly share code, notes, and snippets.

@nathanchicken
Created September 6, 2018 13:54
Show Gist options
  • Save nathanchicken/8598a2260aec02f5cf9bcc9c1cbd079d to your computer and use it in GitHub Desktop.
Save nathanchicken/8598a2260aec02f5cf9bcc9c1cbd079d to your computer and use it in GitHub Desktop.
Get a classlist to sense check purge
var purgeList = [];
var container = "[data-driver-stats]";
$( container ).each( function() {
$(this).find('*').each( function() {
this.classList.forEach( l => {
if ( purgeList.indexOf( l ) === -1 ) {
purgeList.push( l );
}
})
} );
});
console.log( purgeList.join(" ") );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment