1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
var countOfPagesScrolled = 5; function scrollDown(height, countOfPagesScrolled){ scroll(0, document.body.clientHeight); setTimeout(function(){ if(height != document.body.clientHeight && countOfPagesScrolled > 0){ scrollDown(document.body.clientHeight, --countOfPagesScrolled); }else return sendRequest(); }, 2000); } function sendRequest(){ var inputs = document.getElementsByClassName('artdeco-button artdeco-button--2 artdeco-button--secondary ember-view full-width'); for(var i=0;i<inputs.length;i++) {inputs[i].click();}} scrollDown(document.body.clientheight,countOfPagesScrolled); |