Skip to content

Instantly share code, notes, and snippets.

@thousandlemons
Last active July 21, 2018 02:47
Show Gist options
  • Save thousandlemons/005772225969c55acca42ab5b39def84 to your computer and use it in GitHub Desktop.
Save thousandlemons/005772225969c55acca42ab5b39def84 to your computer and use it in GitHub Desktop.
$(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