Skip to content

Instantly share code, notes, and snippets.

@SeanMcP
Last active September 18, 2019 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanMcP/28c29425be61b89d90ecfbeb45544ae9 to your computer and use it in GitHub Desktop.
Save SeanMcP/28c29425be61b89d90ecfbeb45544ae9 to your computer and use it in GitHub Desktop.
Filter options in "Awesome Design Systems"
// ==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