Commit a95cd91c authored by Tachibana's avatar Tachibana

eme

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