Commit a95cd91c authored by Tachibana's avatar Tachibana

eme

parent e1772fac
{
"id": "MajsoulHelper",
"version": "4.1.5",
"version": "4.1.6",
"name": "牌理辅助",
"author": ["Fr0stbyteR"],
"description": "麻将就是要笑着打。\nWDNMD!\n天凤牌理诚不欺我(",
......
// ==UserScript==
// @name Majsoul Helper
// @namespace https://github.com/Fr0stbyteR/
// @version 0.4.15
// @version 0.4.16
// @description dye recommended discarding tile with tenhou/2 + River tiles indication
// @author Fr0stbyteR, FlyingBamboo
// @match https://www.majsoul.com/*
......@@ -78,8 +78,8 @@
const mToInject = ["play", "fastplay", "record", "fastrecord"];
mToInject.forEach(mType => {
const m = action[mType].bind(action);
action[mType] = action => {
const r = m(action);
action[mType] = (action, ...rest) => {
const r = m(action, ...rest);
setTimeout(() => this.analyse(key, action, mType), delay + (key === "ActionNewRound" && action.al ? 1300 : 0));
// console.log(action);
return r;
......@@ -87,8 +87,8 @@
})
}
const m = view.DesktopMgr.prototype.setChoosedPai;
view.DesktopMgr.prototype.setChoosedPai = e => {
const r = m.call(view.DesktopMgr.Inst, e); // render normally
view.DesktopMgr.prototype.setChoosedPai = (e, ...rest) => {
const r = m.call(view.DesktopMgr.Inst, e, ...rest); // render normally
if (e !== null) this.dyeRiver(e); // override rendering
return r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment