File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Simple social buttons for your site.
14
14
* Reddit
15
15
* Evernote
16
16
* LinkedIn
17
+ * Pinterest
17
18
* EMail
18
19
19
20
## Browser support
Original file line number Diff line number Diff line change 36
36
< a class ="btn-reddit " data-id ="re "> < i class ="fab fa-reddit "> </ i > Reddit</ a >
37
37
< a class ="btn-evernote " data-id ="ev "> < i class ="far fa-sticky-note "> </ i > Evernote</ a >
38
38
< a class ="btn-linkedin " data-id ="in "> < i class ="fab fa-linkedin "> </ i > LinkedIn</ a >
39
+ < a class ="btn-pinterest " data-id ="pi "> < i class ="fab fa-pinterest "> </ i > Pinterest</ a >
39
40
< a class ="btn-mail " data-id ="mail "> < i class ="fas fa-at "> </ i > EMail</ a >
40
41
</ div >
41
42
Original file line number Diff line number Diff line change 18
18
RE_LINK_FORMAT = 'https://reddit.com/submit/?url={0}' ,
19
19
EV_LINK_FORMAT = 'https://www.evernote.com/clip.action?url={0}&t={1}' ,
20
20
IN_LINK_FORMAT = 'https://www.linkedin.com/shareArticle?mini=true&url={0}&title={1}&summary={2}&source={0}' ,
21
+ PI_LINK_FORMAT = 'https://pinterest.com/pin/create/button/?url={0}&media={0}&description={1}' ,
21
22
MAIL_LINK_FORMAT = 'mailto:?Subject={0}{1}&body={2}{3}' ,
22
23
FB_CLASS_NAME = 'fb' ,
23
24
VK_CLASS_NAME = 'vk' ,
27
28
RE_CLASS_NAME = 're' ,
28
29
EV_CLASS_NAME = 'ev' ,
29
30
IN_CLASS_NAME = 'in' ,
31
+ PI_CLASS_NAME = 'pi' ,
30
32
MAIL_CLASS_NAME = 'mail' ,
31
33
32
34
// from https://wcoder.github.io/notes/string-format-for-string-formating-in-javascript
193
195
titleDef ) ;
194
196
break ;
195
197
198
+ case PI_CLASS_NAME :
199
+ this . popupCenter (
200
+ stringFormat ( PI_LINK_FORMAT , [
201
+ url ,
202
+ mergeForTitle ( [ title , desc ] )
203
+ ] ) ,
204
+ titleDef ) ;
205
+ break ;
206
+
196
207
case MAIL_CLASS_NAME :
197
208
if ( title . length > 0 && desc . length > 0 ) {
198
209
text = mergeForTitle ( [ title , desc ] ) ;
You can’t perform that action at this time.
0 commit comments