File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ navigator.share = navigator.share || (function () {
533533 const payload = text + ': ' + url ;
534534 switch ( tool . dataset . tool ) {
535535 case 'copy' : {
536- navigator . clipboard . writeText ( url ) ;
536+ navigator . clipboard . writeText ( ` ${ title } \n ${ data . text || '' } \n ${ url } ` ) ;
537537 break ;
538538 }
539539 case 'print' : {
@@ -544,12 +544,15 @@ navigator.share = navigator.share || (function () {
544544 break ;
545545 }
546546 case 'email' : {
547- window . open ( "mailto:" + '' + '?subject=' + title + '&body=' + url ) ;
547+ // %0D%0A is newline
548+ const emailText = `${ text } %0D%0A`
549+ const mailto = `mailto:?subject=${ title } &body=${ emailText } ${ url } `
550+ window . open ( mailto ) ;
548551 break ;
549552 }
550553 case 'sms' : {
551554 // window.open(toolsUrls.sms(title + ': \n' + url));
552- location . href = `sms:${ language . selectSms } ?&body=${ title } : ${ url } ` ;
555+ location . href = `sms:${ language . selectSms } ?&body=${ title } : ${ data . text || '' } ${ url } ` ;
553556 // window.open("sms:"+''+'?subject='+title+'&body='+url);
554557 break ;
555558 }
You can’t perform that action at this time.
0 commit comments