MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / i

Method i

env/env.js:379–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377 }
378 msg(e = t, s = '', a = '', r) {
379 const i = t => {
380 switch (typeof t) {
381 case void 0:
382 return t
383 case 'string':
384 switch (this.getEnv()) {
385 case 'Surge':
386 case 'Stash':
387 default:
388 return { url: t }
389 case 'Loon':
390 case 'Shadowrocket':
391 return t
392 case 'Quantumult X':
393 return { 'open-url': t }
394 case 'Node.js':
395 return
396 }
397 case 'object':
398 switch (this.getEnv()) {
399 case 'Surge':
400 case 'Stash':
401 case 'Shadowrocket':
402 default: {
403 let e = t.url || t.openUrl || t['open-url']
404 return { url: e }
405 }
406 case 'Loon': {
407 let e = t.openUrl || t.url || t['open-url'],
408 s = t.mediaUrl || t['media-url']
409 return { openUrl: e, mediaUrl: s }
410 }
411 case 'Quantumult X': {
412 let e = t['open-url'] || t.url || t.openUrl,
413 s = t['media-url'] || t.mediaUrl,
414 a = t['update-pasteboard'] || t.updatePasteboard
415 return { 'open-url': e, 'media-url': s, 'update-pasteboard': a }
416 }
417 case 'Node.js':
418 return
419 }
420 default:
421 return
422 }
423 }
424 if (!this.isMute)
425 switch (this.getEnv()) {
426 case 'Surge':

Callers

nothing calls this directly

Calls 1

getEnvMethod · 0.45

Tested by

no test coverage detected