您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Includes button for auto selecting the avatar question in Grumpy King
当前为
// ==UserScript== // @name Grumpy Wise King autofill // @namespace - // @version 0.2 // @description Includes button for auto selecting the avatar question in Grumpy King // @author - // @match http://www.neopets.com/medieval/wiseking.phtml // @match http://www.neopets.com/medieval/grumpyking.phtml // @grant none // ==/UserScript== var d = document; var url = window.location.href; var form = d.getElementsByName("form")[0]; // Default random selection var select = form.getElementsByTagName("select"); for (let i = 0; i < select.length; i++) { let option = select[i].getElementsByTagName("option"); let answer = option[Math.floor(Math.random() * (option.length - 1)) + 1]; answer.selected = true; } if (url.includes("grumpyking")) { // Create avatar question button var div = d.createElement("div"); div.setAttribute("align", "center"); div.setAttribute("id", "avQuestion"); var button = d.createElement("button"); button.setAttribute("type", "button"); var buttonText = d.createTextNode("Avatar question"); button.appendChild(buttonText); div.appendChild(button); form.insertBefore(div, form.childNodes[5]); //["What", "do", "you do if", "*Leave blank*", "fierce", "Peophins", "*Leave blank*", "has eaten too much", "*Leave blank*", "tin of olives"]; var avOptions = [3, 8, 6, 1, 39, 118, 1, 32, 1, 143]; d.getElementById("avQuestion").addEventListener("click", function () { for (let i = 0; i < 10; i++) { let option = d.getElementById("qp" + (i + 1)).getElementsByTagName("option"); let answer = option[avOptions[i]]; answer.selected = true; } }); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址