MCPcopy Create free account
hub / github.com/Semporia/Scripts / msg

Method msg

jd_pk.js:1058–1094  ·  view source on GitHub ↗
(e = t, s = "", i = "", r)

Source from the content-addressed store, hash-verified

1056 }
1057
1058 msg(e = t, s = "", i = "", r) {
1059 const o = t => {
1060 if (!t) return t;
1061 if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {
1062 "open-url": t
1063 } : this.isSurge() ? {
1064 url: t
1065 } : void 0;
1066 if ("object" == typeof t) {
1067 if (this.isLoon()) {
1068 let e = t.openUrl || t.url || t["open-url"],
1069 s = t.mediaUrl || t["media-url"];
1070 return {
1071 openUrl: e,
1072 mediaUrl: s
1073 }
1074 }
1075 if (this.isQuanX()) {
1076 let e = t["open-url"] || t.url || t.openUrl,
1077 s = t["media-url"] || t.mediaUrl;
1078 return {
1079 "open-url": e,
1080 "media-url": s
1081 }
1082 }
1083 if (this.isSurge()) {
1084 let e = t.url || t.openUrl || t["open-url"];
1085 return {
1086 url: e
1087 }
1088 }
1089 }
1090 };
1091 this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r)));
1092 let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];
1093 h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h)
1094 }
1095
1096 log(...t) {
1097 t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))

Callers 2

jd_pk.jsFile · 0.45
jsonParseFunction · 0.45

Calls 6

oFunction · 0.70
isSurgeMethod · 0.45
isLoonMethod · 0.45
postMethod · 0.45
isQuanXMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected