Created
May 4, 2018 17:23
-
-
Save tristansokol/1f1148986e2a22b1c02366bcf1e1212f to your computer and use it in GitHub Desktop.
Sum all stargazers for an entire page of repos for an org, such as github.com/square
This file contains hidden or 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
Array.prototype.map.call( document.querySelectorAll('a.mr-3[href*="stargazers"]'), function(n){ | |
return Number(n.text.replace(',','')) | |
}).reduce(function(total,num){return total+num}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment