Skip to content

Instantly share code, notes, and snippets.

@Nickforall
Last active April 1, 2016 18:32
Show Gist options
  • Save Nickforall/41bce882f2a0f47a0935567c63df49f1 to your computer and use it in GitHub Desktop.
Save Nickforall/41bce882f2a0f47a0935567c63df49f1 to your computer and use it in GitHub Desktop.
Robin grow counter

Console method

  1. Open your browser's development tools.
  • ctrl+ shift + i for chrome
  1. Copy-Paste the code from the robin.js file (below) into your console
  2. Smash enter
var uarray = $("#robinUserList").children();
var grows = 0;
var stays = 0;
var novotes = 0;
var leaves = 0;
for (var i = 0; i < uarray.length; i++) {
if(uarray[i].classList.contains("robin--vote-class--increase")) grows++;
if(uarray[i].classList.contains("robin--vote-class--continue")) stays++;
if(uarray[i].classList.contains("robin--vote-class--novote")) novotes++;
if(uarray[i].classList.contains("robin--vote-class--abandon")) leaves++;
}
var outstr = "";
outstr+="GROW [" + grows + "/" + uarray.length + "]\n";
outstr+="STAY [" + stays + "/" + uarray.length + "]\n";
outstr+="QUIT [" + leaves + "/" + uarray.length + "]\n";
outstr+="NONE [" + novotes + "/" + uarray.length + "]\n";
alert(outstr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment