Skip to content

Instantly share code, notes, and snippets.

@vuryleo
Created October 30, 2013 16:09
Show Gist options
  • Save vuryleo/7235327 to your computer and use it in GitHub Desktop.
Save vuryleo/7235327 to your computer and use it in GitHub Desktop.
Auto selector for RedWeb of Tsinghua. For it need to run in Chrome console, it just have one line.
a=0;b=2;trl = document.getElementsByTagName("tr");for(var i = 0; i < trl.length; i ++){pl = trl[i].getElementsByTagName("input"); if (pl.length==5){pl[parseInt(Math.random()*(b-a))+a].checked=true;}};document.getElementsByTagName("input")[100].click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment