Last active
March 11, 2020 15:47
-
-
Save chrislawes/b76115b398bf3edd10ffb71f0b1e4b15 to your computer and use it in GitHub Desktop.
Add column counts to Asana boards
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
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