Skip to content

Instantly share code, notes, and snippets.

@chrislawes
Last active March 11, 2020 15:47
Show Gist options
  • Save chrislawes/b76115b398bf3edd10ffb71f0b1e4b15 to your computer and use it in GitHub Desktop.
Save chrislawes/b76115b398bf3edd10ffb71f0b1e4b15 to your computer and use it in GitHub Desktop.
Add column counts to Asana boards
document.querySelectorAll('.BoardColumn').forEach(item => {
const colCount = `${item.querySelectorAll('.SortableList-itemContainer > div').length}`
const countContainer = item.querySelector('.count-container')
countContainer !== null ? countContainer.innerHTML = colCount : item.querySelector('.BoardColumnHeader-name').innerHTML = `${item.querySelector('.BoardColumnHeader-name').innerHTML} - [<span class="count-container">${colCount}</span>]`
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment