Last active
April 25, 2017 09:54
-
-
Save pocmo/28c667e344779f91b366bb2294e2b407 to your computer and use it in GitHub Desktop.
Count open/closed/total tasks for list of visible GitHub issues
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 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