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 @@ -534,7 +534,7 @@ navigator.share = navigator.share || (function () {
534534 const payload = encodeURIComponent ( text + ': ' + url ) ;
535535 switch ( tool . dataset . tool ) {
536536 case 'copy' : {
537- navigator . clipboard . writeText ( url ) ;
537+ navigator . clipboard . writeText ( ` ${ title } \n ${ data . text || '' } \n ${ url } ` ) ;
538538 break ;
539539 }
540540 case 'print' : {
@@ -545,12 +545,15 @@ navigator.share = navigator.share || (function () {
545545 break ;
546546 }
547547 case 'email' : {
548- window . open ( "mailto:" + '' + '?subject=' + title + '&body=' + url ) ;
548+ // %0D%0A is newline
549+ const emailText = `${ text } %0D%0A`
550+ const mailto = `mailto:?subject=${ title } &body=${ emailText } ${ url } `
551+ window . open ( mailto ) ;
549552 break ;
550553 }
551554 case 'sms' : {
552555 // window.open(toolsUrls.sms(title + ': \n' + url));
553- location . href = `sms:${ language . selectSms } ?&body=${ title } : ${ url } ` ;
556+ location . href = `sms:${ language . selectSms } ?&body=${ title } : ${ data . text || '' } ${ url } ` ;
554557 // window.open("sms:"+''+'?subject='+title+'&body='+url);
555558 break ;
556559 }
You can’t perform that action at this time.
0 commit comments