by
845 17
2
4
136
0
Popular
Easy-to-find
Specified
MultiPlatform
Popularity: 1227156th place
Created
Modified May 12, 2017
Languagejs
LicenseMIT_X11

is your DOM classy? Wouldn't your console like to know...

Intended as Dev Tool to be utilised in the browser console so that refactoring your messy CSS can be less hurty.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1801013/is-your-DOM-classy?-Wouldn-t-your-consol?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
;( function (){ "use strict"; //get ALL DOM elements => BODY > *, BODY * var elms = document.body.getElementsByTagName("*"), i = elms.length, arr = [], classArray; //iterate, isolate, finally indicate while( i-- ) { classArray = elms[i].className.split(/\s+/); if (classArray.length > 1) { arr.push( classArray[1] ); } } console.log( arr.join(',') ); return arr; })();
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus