| 128 | } |
| 129 | |
| 130 | function 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 | |
| 158 | function get(options) { |
| 159 | if (isQuanX) { |