Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array.from(document.querySelectorAll('.section-device')).map(x => {
- var def = x.querySelector('.device').classList.item(1);
- var colors = Array.from(x.querySelectorAll('.dot.tooltip'))
- if (colors.length === 0) {
- return [{
- className: def,
- color: null
- }]
- }
- return colors.map(c => {
- return {
- className: `${def} ${c.getAttribute('data-tooltip')}`,
- color: c.getAttribute('style')
- }
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement