Skip to content

Instantly share code, notes, and snippets.

@Noobgam
Last active March 29, 2018 22:50
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 Noobgam/6e8d5307a51060015c0275dd6772f8fc to your computer and use it in GitHub Desktop.
Save Noobgam/6e8d5307a51060015c0275dd6772f8fc to your computer and use it in GitHub Desktop.
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