您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Refreshes every 5 - 10 minutes at the Magma Pool. When the guard falls asleep, there will be a pop-up window with your Magma Pool time. Stops refreshing after 100 refreshes.
// ==UserScript== // @name Neopets: Magma Pool Checker // @version 0.1 // @namespace http://clraik.com/forum/showthread.php?61676-Neopets-Magma-Pool-Checker // @description Refreshes every 5 - 10 minutes at the Magma Pool. When the guard falls asleep, there will be a pop-up window with your Magma Pool time. Stops refreshing after 100 refreshes. // @author AyBeCee (clraik) // @match http://www.neopets.com/magma/pool.phtml // @grant none // @require https://code.jquery.com/jquery-1.7.1.min.js // ==/UserScript== var maxReloads = "100"; // max number of reloads until the script stops var state = history.state || {}; var reloadCount = state.reloadCount || 0; if (performance.navigation.type === 1) { state.reloadCount = ++reloadCount; history.replaceState(state, null, document.URL); } else if (reloadCount) { reloadCount = 0; delete state.reloadCount; history.replaceState(state, null, document.URL); } var MagmaInfo = document.getElementsByClassName("content")[0].getElementsByTagName("b")[0]; MagmaInfo.innerHTML = "Magma Pool<br><br><font color='red'>The script for the Magma Pool checker is currently running.<br><br>This page has been reloaded " + reloadCount + " times.</font>"; if (reloadCount > maxReloads){ window.alert("You have reloaded the page at least " + maxReloads + " times. This script has been paused for your safety. To restart the counter, close this tab and then reopen it."); } if (document.body.innerHTML.indexOf('guard is sleeping') != -1){ var MagmaTime = document.getElementById("nst").innerHTML; window.alert("Your Magma Pool time is " + MagmaTime); } if (document.body.innerHTML.indexOf('only those well-versed in the ways of Moltara are permitted to enter the Pool') != -1){ var wait=Math.floor(Math.random() * 300001) + 300000; setTimeout(function(){ location.reload(); }, wait); }