Last active
September 18, 2019 17:20
-
-
Save SeanMcP/28c29425be61b89d90ecfbeb45544ae9 to your computer and use it in GitHub Desktop.
Filter options in "Awesome Design Systems"
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
// ==UserScript== | |
// @name Filter options in "Awesome Design Systems" | |
// @version 1 | |
// @grant none | |
// @match https://github.com/alexpate/awesome-design-systems | |
// ==/UserScript== | |
(() => { | |
'use strict' | |
document.querySelector('article.markdown-body').querySelectorAll('tr').forEach(row => { | |
const cells = row.querySelectorAll('td') | |
if (cells.length > 0) { | |
console.groupCollapsed(cells[0].innerText) | |
console.log('Row', row) | |
console.log('Cells', cells) | |
if (!cells[1].hasChildNodes() || !cells[3].hasChildNodes() || !cells[4].hasChildNodes()) { | |
console.warn('Lacking') | |
row.style = `opacity: 0.125;` | |
} | |
} | |
console.groupEnd() | |
}) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment