Skip to content

Instantly share code, notes, and snippets.

@xwartz
Created October 14, 2015 13:01
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 xwartz/d848c2f9ef8516245d53 to your computer and use it in GitHub Desktop.
Save xwartz/d848c2f9ef8516245d53 to your computer and use it in GitHub Desktop.
天猫双11领优惠劵.. 自行滚动到页面底部 http://www.tmall.com/wow/act/14931/1111
var it = document.getElementsByClassName('mui-act-item-yhqbtn');
var i = 0;
function get(){
if(it.length <= i) return;
it[i++].click();
var c = document.getElementsByClassName('mui-dialog-close')[0];
c && c.click();
setTimeout(function(){get(); console.log(i)}, 500);
}
get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment