@@ -401,20 +401,24 @@ function Env(name, opts) {
401
401
*/
402
402
msg ( title = name , subt = '' , desc = '' , opts ) {
403
403
const toEnvOpts = ( rawopts ) => {
404
- if ( ! rawopts || ( ! this . isLoon ( ) && this . isSurge ( ) ) ) return rawopts
404
+ if ( ! rawopts ) return rawopts
405
405
if ( typeof rawopts === 'string' ) {
406
406
if ( this . isLoon ( ) ) return rawopts
407
407
else if ( this . isQuanX ( ) ) return { 'open-url' : rawopts }
408
+ else if ( this . isSurge ( ) ) return { url : rawopts }
408
409
else return undefined
409
410
} else if ( typeof rawopts === 'object' ) {
410
411
if ( this . isLoon ( ) ) {
411
- let openUrl = rawopts . openUrl || rawopts [ 'open-url' ]
412
+ let openUrl = rawopts . openUrl || rawopts . url || rawopts [ 'open-url' ]
412
413
let mediaUrl = rawopts . mediaUrl || rawopts [ 'media-url' ]
413
414
return { openUrl, mediaUrl }
414
415
} else if ( this . isQuanX ( ) ) {
415
- let openUrl = rawopts [ 'open-url' ] || rawopts . openUrl
416
+ let openUrl = rawopts [ 'open-url' ] || rawopts . url || rawopts . openUrl
416
417
let mediaUrl = rawopts [ 'media-url' ] || rawopts . mediaUrl
417
418
return { 'open-url' : openUrl , 'media-url' : mediaUrl }
419
+ } else if ( this . isSurge ( ) ) {
420
+ let openUrl = rawopts . url || rawopts . openUrl || rawopts [ 'open-url' ]
421
+ return { 'url' : openUrl }
418
422
}
419
423
} else {
420
424
return undefined
0 commit comments