Neopets - Magma pool helper

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

< 脚本Neopets - Magma pool helper的反馈

评价:好评 - 脚本运行良好

§
发表于: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;

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址