Neopets - Magma pool helper

Refreshes the page every five minutes until the guard is asleep, then prints the current time

< Feedback on Neopets - Magma pool helper

Review: Good - script works

§
Posted: 2021-09-01

I added the ability to set a time range in which the script will refresh the page randomly. Now I'd like to figure out a way to display a countdown timer...


var strHTML = document.body.innerHTML;
var yourTime = new Date();
var DelayMax = 120000; // 2 minutes
var DelayMin = 480000; // 8 minutes


if(strHTML.indexOf("I'm sorry, only those well-versed in the ways of Moltara are permitted to enter the Pool.") < 0){
alert(yourTime);
} else {
var lastCheck = document.createElement("div");
lastCheck.innerHTML = "Last Check: " + yourTime.toString();
var parent = document.getElementsByClassName("content")[0];
parent.insertBefore(lastCheck, parent.children[1]);
window.setTimeout(function(){window.location.reload() ;},(Math.round(Math.random() * (DelayMax - DelayMin)) + DelayMin)) ;
}
return;

Post reply

Sign in to post a reply.