You've already forked AstralRinth
forked from didirus/AstralRinth
kill ads loop after 10s
This commit is contained in:
@@ -107,13 +107,17 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let attempts = 0;
|
||||||
function syncAgreeState() {
|
function syncAgreeState() {
|
||||||
const primaryButton = document.querySelector('[mode="primary"]');
|
const primaryButton = document.querySelector('[mode="primary"]');
|
||||||
|
|
||||||
if (primaryButton) {
|
if (primaryButton) {
|
||||||
primaryButton.click();
|
primaryButton.click();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(syncAgreeState, 100);
|
attempts++;
|
||||||
|
if (attempts < 10) {
|
||||||
|
setTimeout(syncAgreeState, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
syncAgreeState();
|
syncAgreeState();
|
||||||
|
|||||||
Reference in New Issue
Block a user