Skip to content

Commit 4e9be39

Browse files
committed
Add Skype. Closed #2
1 parent 25eaa49 commit 4e9be39

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Reddit | re
6969
Evernote | ev
7070
LinkedIn | in
7171
Pinterest | pi
72+
Skype | sk
7273
EMail | mail
7374

7475
## Customizing

example/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<a class="btn-evernote" data-id="ev"><i class="far fa-sticky-note"></i> Evernote</a>
3838
<a class="btn-linkedin" data-id="in"><i class="fab fa-linkedin"></i> LinkedIn</a>
3939
<a class="btn-pinterest" data-id="pi"><i class="fab fa-pinterest"></i> Pinterest</a>
40+
<a class="btn-skype" data-id="sk"><i class="fab fa-skype"></i> Skype</a>
4041
<a class="btn-mail" data-id="mail"><i class="fas fa-at"></i> EMail</a>
4142
</div>
4243

src/share-buttons.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
EV_LINK_FORMAT = 'https://www.evernote.com/clip.action?url={0}&t={1}',
2020
IN_LINK_FORMAT = 'https://www.linkedin.com/shareArticle?mini=true&url={0}&title={1}&summary={2}&source={0}',
2121
PI_LINK_FORMAT = 'https://pinterest.com/pin/create/button/?url={0}&media={0}&description={1}',
22+
SK_LINK_FORMAT = 'https://web.skype.com/share?url={0}&source=button&text={1}',
2223
MAIL_LINK_FORMAT = 'mailto:?Subject={0}{1}&body={2}{3}',
2324
FB_CLASS_NAME = 'fb',
2425
VK_CLASS_NAME = 'vk',
@@ -29,6 +30,7 @@
2930
EV_CLASS_NAME = 'ev',
3031
IN_CLASS_NAME = 'in',
3132
PI_CLASS_NAME = 'pi',
33+
SK_CLASS_NAME = 'sk',
3234
MAIL_CLASS_NAME = 'mail',
3335

3436
// from https://wcoder.github.io/notes/string-format-for-string-formating-in-javascript
@@ -204,6 +206,15 @@
204206
titleDef);
205207
break;
206208

209+
case SK_CLASS_NAME:
210+
this.popupCenter(
211+
stringFormat(SK_LINK_FORMAT, [
212+
url,
213+
mergeForTitle([title, desc])
214+
]),
215+
titleDef);
216+
break;
217+
207218
case MAIL_CLASS_NAME:
208219
if (title.length > 0 && desc.length > 0) {
209220
text = mergeForTitle([title, desc]);

0 commit comments

Comments
 (0)