Last active
July 21, 2018 02:47
-
-
Save thousandlemons/005772225969c55acca42ab5b39def84 to your computer and use it in GitHub Desktop.
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
$(function() { | |
let titleDOM = $('th.reactable-th-question_title').children('strong'); | |
let statusDOM = $('th.reactable-th-status'); | |
let tableDOM = $('tbody.reactable-data'); | |
let filtersDOM = $('div.filter-tag-bar'); | |
let refresh = function(){ | |
let count = $('tbody.reactable-data').children().length; | |
let acCount = $('tbody.reactable-data').find('td[value="ac"]').length; | |
titleDOM.text('Title' + ' (Total=' + count + ')'); | |
statusDOM.text(acCount); | |
} | |
refresh(); | |
let config = { attributes: true, childList: true, subtree: true }; | |
let observer = new MutationObserver(refresh); | |
observer.observe(filtersDOM[0], config); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment