Grumpy Wise King autofill

-

目前为 2021-01-11 提交的版本。查看 最新版本

// ==UserScript==
// @name         Grumpy Wise King autofill
// @namespace    http://tampermonkey.net/
// @version      2020.01.11
// @description  -
// @author       -
// @match        http://www.neopets.com/medieval/wiseking.phtml
// @match        http://www.neopets.com/medieval/grumpyking.phtml
// @grant        none
// ==/UserScript==

$("form[name='form']").find("select").each(function (index, element) {
    const numOptions = $(element).find("option").length;
    const random = Math.floor(Math.random() * (numOptions - 1)) + 1;
    $(element).find("option").eq(random).prop("selected", true);
});

if (document.URL.includes("grumpyking")) {
    //["What", "do", "you do if", "*Leave blank*", "fierce", "Peophins", "*Leave blank*", "has eaten too much", "*Leave blank*", "tin of olives"];
    const avOptions = [3, 8, 6, 1, 39, 118, 1, 32, 1, 143];
    for (let i = 0; i < 10; i++) {
        $(`#qp${i + 1} option`).eq(avOptions[i]).prop("selected", true);
    }
}

QingJ © 2025

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