Comparing version 1.5.0 to 1.6.0
@@ -0,1 +1,5 @@ | ||
## 1.6.0 | ||
Support Telegram. | ||
## 1.5.0 | ||
@@ -2,0 +6,0 @@ |
@@ -1,2 +0,2 @@ | ||
var sharon=function(){"use strict";var t=0,e=function(e,n){var r=e.url||e,o=e.object||window,i=e.key||"j"+t++,c=void 0===e.parameter?"callback":e.parameter,u=document.createElement("script");u.src=c?r+(~r.indexOf("?")?"&":"?")+c+"="+i:r,u.onerror=function(){delete o[i],n(Error())},o[i]=function(t){delete o[i],n(null,t)},document.head.removeChild(document.head.appendChild(u))},n=e,r=function(t,e,r){return function(o,i){arguments.length<2&&(i=o,o=location),n({url:t+"="+encodeURIComponent(o),parameter:r},function(t,n){return t?i(t):void i(null,e(n))})}},o=function(t,e){return e&&Object.keys(e).forEach(function(n){t[n]=e[n]}),t},i=o,c=function(t,e){return e=e||{},function(n,r){"string"==typeof n?r=i({url:n},r):(r=i({url:location},n),e.title&&(r.title=r.title||document.title));var o=Object.keys(r).map(function(t){var n=e[t]||t;return Array.isArray(r[t])?n+"="+r[t].map(encodeURIComponent):n+"="+encodeURIComponent(r[t])});return t+(~t.indexOf("?")?"&":"?")+o.join("&")}},u=function(t,e,n){function r(){var r=t.apply(this,arguments);if(e){var o=Math.max(0,Math.round(screen.height/3-n/2)),i=Math.round((screen.width-e)/2);window.open(r,null,"width="+e+",height="+n+",top="+o+",left="+i+",location,resizable,scrollbars,toolbar=no")}else window.open(r)}return r.href=t,r},a=r,s=c,l=u,p=s("https://buffer.com/add",{title:"text"}),h=l(p,850,600),d=a("https://api.bufferapp.com/1/links/shares.json?url",function(t){return t.shares});h.count=d;var m=r,w=c,f=u,v=w("https://www.facebook.com/sharer.php",{url:"u"}),b=f(v,670,340),k=m("https://graph.facebook.com/?id",function(t){return t.share?t.share.share_count:0});b.count=k;var g=c,x=u,j=g("https://mail.google.com/mail/?view=cm",{title:"su",url:"body"}),y=x(j,800,632),C=r,U=c,O=u,I=U("https://www.linkedin.com/shareArticle",{title:"title"}),R=O(I,600,400),A=C("https://www.linkedin.com/countserv/count/share?url",function(t){return t.count});R.count=A;var E=e,M=function(t,e,n){return function(r,o){arguments.length<2&&(o=r,r=location);var i=n.length+"";E({url:t+encodeURIComponent(r)+e+i,parameter:!1,object:n,key:i},o)}},K=M,L=c,S=u,_=L("https://connect.ok.ru/dk?st.cmd=WidgetSharePreview",{url:"st.shareUrl"}),z=S(_,580,350),D=[];window.ODKL={updateCount:function(t,e){D[t](+e)}};var N=K("https://connect.ok.ru/dk?st.cmd=extLike&ref=","&uid=",D);z.count=N;var P=r,V=c,W=u,q=V("https://www.pinterest.com/pin/create/button/",{title:"description"}),B=W(q,750,320),F=P("https://api.pinterest.com/v1/urls/count.json?url",function(t){return t.count});B.count=F;var G=r,H=c,J=u,Q=H("https://plus.google.com/share"),T=J(Q,600,600),X=G("https://share.yandex.ru/gpp.xml?url",Number);T.count=X;var Y=r,Z=c,$=u,tt=Z("https://www.reddit.com/submit",{title:"title"}),et=$(tt),nt=Y("https://www.reddit.com/api/info.json?url",function(t){return t.data.children.reduce(function(t,e){return t+e.data.score},0)},"jsonp");et.count=nt;var rt=r,ot=c,it=u,ct=ot("https://www.tumblr.com/widgets/share/tool",{title:"title",url:"canonicalUrl"}),ut=it(ct,557,600),at=rt("https://api.tumblr.com/v2/share/stats?url",function(t){return t.response.note_count});ut.count=at;var st=c,lt=u,pt=st("https://twitter.com/intent/tweet",{title:"text"}),ht=lt(pt,550,420),dt=M,mt=c,wt=u,ft=mt("https://vk.com/share.php"),vt=wt(ft,650,610),bt=[];window.VK={Share:{count:function(t,e){bt[t](e)}}};var kt=dt("https://vk.com/share.php?act=count&url=","&index=",bt);return vt.count=kt,{buffer:h,facebook:b,gmail:y,linkedin:R,ok:z,pinterest:B,plus:T,reddit:et,tumblr:ut,twitter:ht,vk:vt,weibo:u(c("http://service.weibo.com/share/share.php",{title:"title"}),615,505),xing:u(c("https://www.xing.com/spi/shares/new"),570,530)}}(); | ||
var sharon=function(){"use strict";var t=0,e=function(e,n){var r=e.url||e,o=e.object||window,i=e.key||"j"+t++,c=void 0===e.parameter?"callback":e.parameter,u=document.createElement("script");u.src=c?r+(~r.indexOf("?")?"&":"?")+c+"="+i:r,u.onerror=function(){delete o[i],n(Error())},o[i]=function(t){delete o[i],n(null,t)},document.head.removeChild(document.head.appendChild(u))},n=e,r=function(t,e,r){return function(o,i){arguments.length<2&&(i=o,o=location),n({url:t+"="+encodeURIComponent(o),parameter:r},function(t,n){return t?i(t):void i(null,e(n))})}},o=function(t,e){return e&&Object.keys(e).forEach(function(n){t[n]=e[n]}),t},i=o,c=function(t,e){return e=e||{},function(n,r){"string"==typeof n?r=i({url:n},r):(r=i({url:location},n),e.title&&(r.title=r.title||document.title));var o=Object.keys(r).map(function(t){var n=e[t]||t;return Array.isArray(r[t])?n+"="+r[t].map(encodeURIComponent):n+"="+encodeURIComponent(r[t])});return t+(~t.indexOf("?")?"&":"?")+o.join("&")}},u=function(t,e,n){function r(){var r=t.apply(this,arguments);if(e){var o=Math.max(0,Math.round(screen.height/3-n/2)),i=Math.round((screen.width-e)/2);window.open(r,null,"width="+e+",height="+n+",top="+o+",left="+i+",location,resizable,scrollbars,toolbar=no")}else window.open(r)}return r.href=t,r},a=r,s=c,l=u,h=s("https://buffer.com/add",{title:"text"}),p=l(h,850,600),d=a("https://api.bufferapp.com/1/links/shares.json?url",function(t){return t.shares});p.count=d;var m=r,w=c,f=u,v=w("https://www.facebook.com/sharer.php",{url:"u"}),b=f(v,670,340),k=m("https://graph.facebook.com/?id",function(t){return t.share?t.share.share_count:0});b.count=k;var g=c,x=u,j=g("https://mail.google.com/mail/?view=cm",{title:"su",url:"body"}),y=x(j,800,632),C=r,U=c,O=u,I=U("https://www.linkedin.com/shareArticle",{title:"title"}),R=O(I,600,400),A=C("https://www.linkedin.com/countserv/count/share?url",function(t){return t.count});R.count=A;var E=e,M=function(t,e,n){return function(r,o){arguments.length<2&&(o=r,r=location);var i=n.length+"";E({url:t+encodeURIComponent(r)+e+i,parameter:!1,object:n,key:i},o)}},K=M,L=c,S=u,_=L("https://connect.ok.ru/dk?st.cmd=WidgetSharePreview",{url:"st.shareUrl"}),z=S(_,580,350),D=[];window.ODKL={updateCount:function(t,e){D[t](+e)}};var N=K("https://connect.ok.ru/dk?st.cmd=extLike&ref=","&uid=",D);z.count=N;var P=r,V=c,W=u,q=V("https://www.pinterest.com/pin/create/button/",{title:"description"}),B=W(q,750,320),F=P("https://api.pinterest.com/v1/urls/count.json?url",function(t){return t.count});B.count=F;var G=r,H=c,J=u,Q=H("https://plus.google.com/share"),T=J(Q,600,600),X=G("https://share.yandex.ru/gpp.xml?url",Number);T.count=X;var Y=r,Z=c,$=u,tt=Z("https://www.reddit.com/submit",{title:"title"}),et=$(tt),nt=Y("https://www.reddit.com/api/info.json?url",function(t){return t.data.children.reduce(function(t,e){return t+e.data.score},0)},"jsonp");et.count=nt;var rt=c,ot=u,it=rt("https://t.me/share",{title:"text"}),ct=ot(it,600,500),ut=r,at=c,st=u,lt=at("https://www.tumblr.com/widgets/share/tool",{title:"title",url:"canonicalUrl"}),ht=st(lt,557,600),pt=ut("https://api.tumblr.com/v2/share/stats?url",function(t){return t.response.note_count});ht.count=pt;var dt=c,mt=u,wt=dt("https://twitter.com/intent/tweet",{title:"text"}),ft=mt(wt,550,420),vt=M,bt=c,kt=u,gt=bt("https://vk.com/share.php"),xt=kt(gt,650,610),jt=[];window.VK={Share:{count:function(t,e){jt[t](e)}}};var yt=vt("https://vk.com/share.php?act=count&url=","&index=",jt);return xt.count=yt,{buffer:p,facebook:b,gmail:y,linkedin:R,ok:z,pinterest:B,plus:T,reddit:et,telegram:ct,tumblr:ht,twitter:ft,vk:xt,weibo:u(c("http://service.weibo.com/share/share.php",{title:"title"}),615,505),xing:u(c("https://www.xing.com/spi/shares/new"),570,530)}}(); | ||
//# sourceMappingURL=sharon.min.js.map |
@@ -10,2 +10,3 @@ module.exports = { | ||
reddit: require('./reddit'), | ||
telegram: require('./telegram'), | ||
tumblr: require('./tumblr'), | ||
@@ -12,0 +13,0 @@ twitter: require('./twitter'), |
{ | ||
"name": "sharon", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "A lightweight and modular social sharing library", | ||
@@ -16,2 +16,3 @@ "keywords": [ | ||
"reddit", | ||
"telegram", | ||
"tumblr", | ||
@@ -18,0 +19,0 @@ "twitter", |
@@ -8,4 +8,4 @@ [![Sauce Test Status][saucelabs-badge]][saucelabs] | ||
- a toolkit to build your own share buttons; | ||
- supports 13 sharing platforms; | ||
- gzipped size is 1.68 KB; | ||
- supports 14 sharing platforms; | ||
- gzipped size is 1.71 KB; | ||
- you can cherry-pick which sharing platforms to use to make it even smaller. | ||
@@ -78,3 +78,3 @@ | ||
- [Production version][download] – 1.68 KB, minified and gzipped | ||
- [Production version][download] – 1.71 KB, minified and gzipped | ||
- [Source map][download-map] | ||
@@ -98,2 +98,3 @@ | ||
| Reddit | `sharon.reddit` | Yes | [Reference][params-reddit] | | ||
| Telegram | `sharon.telegram` | | | | ||
| Tumblr | `sharon.tumblr` | Yes | [Reference][params-tumblr] | | ||
@@ -283,7 +284,7 @@ | Twitter | `sharon.twitter` | | [Reference][params-twitter] | | ||
[download]: https://github.com/borodean/sharon/releases/download/1.5.0/sharon-1.5.0.min.js | ||
[download-map]: https://github.com/borodean/sharon/releases/download/1.5.0/sharon-1.5.0.min.js.map | ||
[download]: https://github.com/borodean/sharon/releases/download/1.6.0/sharon-1.6.0.min.js | ||
[download-map]: https://github.com/borodean/sharon/releases/download/1.6.0/sharon-1.6.0.min.js.map | ||
[media-example]: media/example.png | ||
[media-heart]: https://cdn.rawgit.com/borodean/sharon/1.5.0/media/heart.svg | ||
[media-sharon]: https://cdn.rawgit.com/borodean/sharon/1.5.0/media/sharon.svg | ||
[media-heart]: https://cdn.rawgit.com/borodean/sharon/1.6.0/media/heart.svg | ||
[media-sharon]: https://cdn.rawgit.com/borodean/sharon/1.6.0/media/sharon.svg | ||
[params-buffer]: https://buffer.com/extras/button | ||
@@ -290,0 +291,0 @@ [params-linkedin]: https://developer.linkedin.com/docs/share-on-linkedin |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40273
26
284
297