您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to automatically check the prices of that page
// ==UserScript== // @name Neopets: Shop stock price check // @author Tombaugh Regio // @version 1.0 // @description Adds a button to automatically check the prices of that page // @namespace https://gf.qytechs.cn/users/780470 // @match http://www.neopets.com/market.phtml?type=your* // @match https://items.jellyneo.net/tools/shop-stock-price-checker/ // @grant GM_openInTab // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // ==/UserScript== const URL = document.URL if (URL.includes("neopets")) { const title = document.querySelector(".content").querySelector("table").nextSibling.nextSibling.nextSibling.nextSibling //Add a price checker button const itemCheckerButton = document.createElement("button") const itemCheckerLink = document.createElement("a") itemCheckerButton.innerText = "Check prices on this page" itemCheckerButton.style.margin = "0 0.5em" //Get the entire HTML of this page GM_xmlhttpRequest({ method: 'GET', url: URL, headers: { 'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey', 'Accept': 'application/atom+xml,application/xml,text/xml', }, onload: function(responseDetails) { return new Promise((resolve, reject) => { resolve(GM_setValue("allHTML", responseDetails.responseText)) }) } }) //Open the price checker page itemCheckerButton.onclick = e => { e.preventDefault() GM_openInTab("https://items.jellyneo.net/tools/shop-stock-price-checker/") } //Append button after title title.after(itemCheckerButton) } if (URL.includes("shop-stock-price-checker")) { const inputTextArea = document.querySelector("#price-check-code") const priceCheckButton = document.querySelector("#price-check-submit") const sdbPage = GM_getValue("allHTML") inputTextArea.textContent = sdbPage if (inputTextArea.textContent.length > 0) priceCheckButton.click() }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址