Free javascript Hosting


startforaging.js

Uploaded on Jan 23 2022 04:28 by tovog86863

function pollDOM () {
const el = document.querySelector('my-element');

if (el.length) {
// Do something with el
} else {
setTimeout(pollDOM, 300); // try again in 300 milliseconds
}
}


(function() {
//open foraging quest
document.getElementsByClassName("forager-clickbox")[0].click();
document.getElementsByClassName("QuestProviderModal_largeLink__32fIF")[0].click();
document.getElementsByClassName("HeroSelectRow_transparentButton__37o12")[0].click();

//filter foraging heros
document.getElementsByClassName("Buttons_ghost__2QFIX")[1].click();
document.getElementsByClassName("MuiTab-wrapper")[1].click();
document.getElementsByName("foraging")[0].click();
document.getElementsByClassName("Buttons_ghost__2QFIX")[0].click();

//select all heros
for (let i = 0; i < document.getElementsByClassName("Buttons_small__3t7Uf").length; ++i) {
if (document.getElementsByClassName("Buttons_small__3t7Uf")[i].innerText == 'SELECT HERO (5 STAMINA)'){
document.getElementsByClassName("Buttons_small__3t7Uf")[i].click();
}
}

//continue with heros
for (let i = 0; i < document.getElementsByClassName("Buttons_primary__Dm8vM").length; ++i) {
if (document.getElementsByClassName("Buttons_primary__Dm8vM")[i].innerText.substring(0, 13) == 'CONTINUE WITH'){
document.getElementsByClassName("Buttons_primary__Dm8vM")[i].click();
}
}


}
)
();

Back to list