-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConsoleDIVdump.js
44 lines (32 loc) · 3.05 KB
/
ConsoleDIVdump.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
░▒▓███████▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓██████████████▓▒░░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓██▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
- dj substance
// Paste into console for list of all defined "nonstandard" looking DIV's
one liner:
document.querySelectorAll('div').forEach(div => !['container', 'main', 'content', 'wrapper', 'footer', 'header', 'sidebar'].some(name => div.className.split(/\s+/).includes(name) || div.id === name) && console.log(div));
document.querySelectorAll('div').forEach(function(div) {
// Define a list of standard names to exclude
const standardNames = ['container', 'main', 'content', 'wrapper', 'footer', 'header', 'sidebar'];
let classNames = div.className.split(/\s+/); // Split class names into an array
let idName = div.id;
let matchesStandard = false;
// Check if any of the class names match the standard names
classNames.forEach(function(name) {
if (standardNames.includes(name)) {
matchesStandard = true;
}
});
// Check if the id name matches the standard names
if (standardNames.includes(idName)) {
matchesStandard = true;
}
// If no standard names are matched, log the div
if (!matchesStandard) {
console.log(div);
}
});