Last active
March 29, 2018 22:50
-
-
Save Noobgam/6e8d5307a51060015c0275dd6772f8fc to your computer and use it in GitHub Desktop.
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
autoupgrade = 0; | |
autohq = 1; | |
if (autoupgrade === 1) { | |
setInterval(function() { | |
current_queue = document.getElementsByClassName('in-queue building-queue short')[0]; | |
busy = -1 | |
if (current_queue === undefined) { | |
busy = 0; | |
} else { | |
busy = ParseInt(current_queue.innerText); | |
} | |
if (busy === 2) { | |
return; | |
} | |
arr = document.getElementsByClassName('size-44x44 btn-upgrade btn-orange'); | |
for (var i = 1; i <= 3; i++) { | |
btn = arr[i]; | |
if (btn.classList.contains('btn-grey')) { | |
continue; | |
} | |
btn.click(); | |
} | |
}, 10000); | |
} | |
if (autohq) { | |
setInterval( function() { | |
if (document.getElementsByClassName("size-26x26 btn-premium btn-green icon-26x26-check-positive animation-glow-green").length > 0) | |
document.getElementsByClassName("size-26x26 btn-premium btn-green icon-26x26-check-positive animation-glow-green")[0].click(); | |
}, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment