您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
武汉理工大学缴费平台马房山学生电费自动选择寝室房间
// ==UserScript== // @name 缴费平台 // @namespace http://tampermonkey.net/ // @description 武汉理工大学缴费平台马房山学生电费自动选择寝室房间 // @icon https://www.ygb.sdu.edu.cn/__local/9/E7/0F/331A1B05CAA091F3D0D449F33AC_F12234D9_7045F.png // @version 0.1 // @author smili // @license MIT // @match *://cwsf.whut.edu.cn/nyyPayElecPages51274E035 // @match *://cwsf.whut.edu.cn/MNetWorkUI/nyyPayElecPages51274E035 // @grant GM_registerMenuCommand // @grant GM_setValue // @grant GM_getValue // ==/UserScript== (function () { 'use strict'; const _ = GM_getValue("_") || {}; const areaid = _.areaid || "-1"; const areaEl = $("#areaid"); const config = ["building", "floorid", "roomid"].map(i => ({ n: i, e: $("#" + i), v: _[i] || "-1" })); GM_registerMenuCommand("保存", () => { _.areaid = areaEl.val(); config.forEach(i => { _[i.n] = i.e.val(); }); GM_setValue("_", _); }); areaEl.on("DOMNodeInserted", e => { if ($(e.originalEvent.target).val() === areaid) { areaEl.off("DOMNodeInserted").val(areaid).change(); for (let i of config) { i.e.val(i.v).change(); } } }); })();