Created
January 27, 2016 16:28
-
-
Save arleslie/2a8debc4a25cad7b4c76 to your computer and use it in GitHub Desktop.
Dailybreak auto bot
This file contains 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
function scrollForPoints() { | |
var current = $('span.points').text(); | |
function scroll() { | |
var bottemReached = $(window).scrollTop() + $(window).height() == $(document).height(); | |
if (current === $('span.points').text()) { | |
if (bottemReached) { | |
window.scrollTo(0,0); | |
alert('poll'); | |
} else { | |
window.scrollBy(0, 60); | |
setTimeout(scroll, 20); | |
} | |
} else { | |
loadNewsPage(); | |
} | |
} | |
scroll(); | |
} | |
function loadNewPage() | |
{ | |
$($('div.award > span').parent().siblings('.image').children('a')[1]).click(); | |
setTimeout(scrollForPoints, 3000); | |
} | |
function loadNewsPage() | |
{ | |
$('.nav-item.open').trigger('click'); | |
setTimeout(loadNewPage, 2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment