MCPcopy Create free account
hub / github.com/Moli-X/Resources / notify

Function notify

Script/Wechat.js:130–156  ·  view source on GitHub ↗
(title = "", subtitle = "", content = "", open_url)

Source from the content-addressed store, hash-verified

128}
129
130function notify(title = "", subtitle = "", content = "", open_url) {
131 if (isQuanX && /iOS/.test($environment.version)) {
132 let opts = {};
133 if (open_url) opts["open-url"] = open_url;
134 if (JSON.stringify(opts) == "{}") {
135 $notify(title, subtitle, content);
136 } else {
137 $notify(title, subtitle, content, opts);
138 }
139 } else if (isSurgeiOS) {
140 let opts = {};
141 if (open_url) opts["url"] = open_url;
142 if (JSON.stringify(opts) == "{}") {
143 $notification.post(title, subtitle, content);
144 } else {
145 $notification.post(title, subtitle, content, opts);
146 }
147 } else if (isLooniOS) {
148 let opts = {};
149 if (open_url) opts["openUrl"] = open_url;
150 if (JSON.stringify(opts) == "{}") {
151 $notification.post(title, subtitle, content);
152 } else {
153 $notification.post(title, subtitle, content, opts);
154 }
155 }
156}
157
158function get(options) {
159 if (isQuanX) {

Callers 1

Wechat.jsFile · 0.70

Calls 3

$notifyFunction · 0.70
stringifyMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected