Skip to content

Instantly share code, notes, and snippets.

@blicksky
Last active April 24, 2019 16:33
Show Gist options
  • Save blicksky/94d7a6331165bea287c61e1dd0f131bf to your computer and use it in GitHub Desktop.
Save blicksky/94d7a6331165bea287c61e1dd0f131bf to your computer and use it in GitHub Desktop.
Hide Trello Label
const hasLabel = (cardElement, label) => Array.from(cardElement.querySelectorAll('.card-label'))
.find((labelElement) => labelElement.title === label);
Array.from(document.querySelectorAll('.list-card'))
.filter((cardElement) => hasLabel(cardElement, 'Pending ⏳'))
.forEach((cardElement) => cardElement.classList.toggle('hide'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment