Skip to content

Instantly share code, notes, and snippets.

@pocmo
Last active April 25, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pocmo/28c667e344779f91b366bb2294e2b407 to your computer and use it in GitHub Desktop.
Save pocmo/28c667e344779f91b366bb2294e2b407 to your computer and use it in GitHub Desktop.
Count open/closed/total tasks for list of visible GitHub issues
(function() {
let open = total = done = 0;
let collection = document.getElementsByClassName('task-progress-counts');
for (let i = 0; i < collection.length; i++) {
let counts = collection[i].innerHTML.split(" of ").map((x) => parseInt(x));
total += counts[1]; done += counts[0]; open += counts[1] - counts[0];
}
alert("Total: " + total + "\nOpen: " + open + "\nDone: " + done);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment