雀魂 役種一覧 ショートカット [Shift + Enter]

Shift + Enter で役職一覧の表示・非表示を行います。

// ==UserScript==
// @name         雀魂 役種一覧 ショートカット [Shift + Enter]
// @version      0.1
// @description  Shift + Enter で役職一覧の表示・非表示を行います。
// @author       炎筆
// @namespace    https://gf.qytechs.cn/users/803913
// @match        https://game.mahjongsoul.com/index.html
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mahjongsoul.com
// ==/UserScript==

let UI_Rules = null;

document.addEventListener('keydown', evt => {
    if(!evt.repeat && evt.code === 'Enter' && evt.shiftKey && UI_Rules) {
        const inst = UI_Rules.Inst;

        if(!inst.enable) {
            inst.show();
        }
        else {
            inst.close();
        }
    }
});

Object.defineProperty(Object.prototype, 'UI_Rules', {
    set(obj) {
        this._UI_Rules = obj;
        UI_Rules = obj;
    },
    get() {
        return this._UI_Rules;
    }
});

QingJ © 2025

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