Skip to content

Commit b1ef4de

Browse files
committed
Add Evernote. Closed #9
1 parent ab4e4c3 commit b1ef4de

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Simple social buttons for your site.
1212
* Telegram
1313
* Pocket
1414
* Reddit
15+
* Evernote
1516
* EMail
1617

1718
## Browser support

example/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<a class="btn-telegram" data-id="tg"><i class="fab fa-telegram"></i> Telegram</a>
3535
<a class="btn-pocket" data-id="pk"><i class="fab fa-get-pocket"></i> Pocket</a>
3636
<a class="btn-reddit" data-id="re"><i class="fab fa-reddit"></i> Reddit</a>
37+
<a class="btn-evernote" data-id="ev"><i class="far fa-sticky-note"></i> Evernote</a>
3738
<a class="btn-mail" data-id="mail"><i class="fas fa-at"></i> EMail</a>
3839
</div>
3940

src/share-buttons.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
TG_LINK_FORMAT = 'https://t.me/share/url?url={0}&text={1}',
1717
POCKET_LINK_FORMAT = 'https://getpocket.com/edit?url={0}&title={1}',
1818
RE_LINK_FORMAT = 'https://reddit.com/submit/?url={0}',
19+
EV_LINK_FORMAT = 'https://www.evernote.com/clip.action?url={0}&t={1}',
1920
MAIL_LINK_FORMAT = 'mailto:?Subject={0}{1}&body={2}{3}',
2021
FB_CLASS_NAME = 'fb',
2122
VK_CLASS_NAME = 'vk',
2223
TW_CLASS_NAME = 'tw',
2324
TG_CLASS_NAME = 'tg',
2425
PK_CLASS_NAME = 'pk',
2526
RE_CLASS_NAME = 're',
27+
EV_CLASS_NAME = 'ev',
2628
MAIL_CLASS_NAME = 'mail',
2729

2830
// from https://wcoder.github.io/notes/string-format-for-string-formating-in-javascript
@@ -173,6 +175,12 @@
173175
titleDef);
174176
break;
175177

178+
case EV_CLASS_NAME:
179+
this.popupCenter(
180+
stringFormat(EV_LINK_FORMAT, [url, title]),
181+
titleDef);
182+
break;
183+
176184
case MAIL_CLASS_NAME:
177185
if (title.length > 0 && desc.length > 0) {
178186
text = mergeForTitle([title, desc]);

0 commit comments

Comments
 (0)