Skip to content

Commit 2c112de

Browse files
committed
Fixed #19 Email format.
1 parent 9dcb55b commit 2c112de

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/share-buttons.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
TU_LINK_FORMAT = 'https://www.tumblr.com/widgets/share/tool?posttype=link&title={0}&caption={0}&content={1}&canonicalUrl={1}&shareSource=tumblr_share_button',
3232
HN_LINK_FORMAT = 'https://news.ycombinator.com/submitlink?t={0}&u={1}',
3333
XI_LINK_FORMAT = 'https://www.xing.com/app/user?op=share;url={0};title={1}',
34-
MAIL_LINK_FORMAT = 'mailto:?Subject={0}{1}&body={2}{3}',
34+
MAIL_LINK_FORMAT = 'mailto:?subject={0}&body={1}',
3535
FB_CLASS_NAME = 'fb',
3636
VK_CLASS_NAME = 'vk',
3737
TW_CLASS_NAME = 'tw',
@@ -314,14 +314,11 @@
314314
if (title.length > 0 && desc.length > 0) {
315315
text = mergeForTitle([title, desc]);
316316
}
317-
if (text.length > 0) {
318-
text = text + ' / ';
319-
}
320-
if (title.length > 0) {
321-
title += ' / ';
317+
if (url.length > 0) {
318+
text = text + ' / ' + url;
322319
}
323320

324-
location.href = stringFormat(MAIL_LINK_FORMAT, [title, titleDef, text, url]);
321+
location.href = stringFormat(MAIL_LINK_FORMAT, [title, text]);
325322
break;
326323

327324
case PRINT_CLASS_NAME:

0 commit comments

Comments
 (0)