New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

social-share-kit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

social-share-kit - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

2

bower.json
{
"name": "social-share-kit",
"version": "1.0.9",
"version": "1.0.10",
"homepage": "http://socialsharekit.com/",

@@ -5,0 +5,0 @@ "authors": [

/*!
* Social Share Kit v1.0.9 (http://socialsharekit.com)
* Social Share Kit v1.0.10 (http://socialsharekit.com)
* Copyright 2015 Social Share Kit / Kaspars Sprogis.
* Licensed under Creative Commons Attribution-NonCommercial 3.0 license:
* @Licensed under Creative Commons Attribution-NonCommercial 3.0 license:
* https://github.com/darklow/social-share-kit/blob/master/LICENSE

@@ -308,3 +308,3 @@ * ---

parseFunc = function (r) {
return onReady(r.shares ? r.shares : 0);
return onReady(r.share ? r.share.share_count : 0);
};

@@ -311,0 +311,0 @@ break;

/*!
* Social Share Kit v1.0.9 (http://socialsharekit.com)
* Social Share Kit v1.0.10 (http://socialsharekit.com)
* Copyright 2015 Social Share Kit / Kaspars Sprogis.
* Licensed under Creative Commons Attribution-NonCommercial 3.0 license:
* @Licensed under Creative Commons Attribution-NonCommercial 3.0 license:
* https://github.com/darklow/social-share-kit/blob/master/LICENSE
* ---
*/
;var SocialShareKit=(function(){var s=/(twitter|facebook|google-plus|pinterest|tumblr|vk|linkedin|email)/,o="*|*",j,b;b=function(z){var y=z||{},x=y.selector||".ssk";this.nodes=f(x);this.options=y};b.prototype={share:function(){var z=this.nodes,y=this.options,x={};l(function(){if(!z.length){return}e(z,function(D){var E=q(D),C;if(!E){return}p(D,"click",A);n(D,"click",A);if(D.parentNode.className.indexOf("ssk-count")!==-1){E=E[0];C=E+o+w(y,E,D);if(!(C in x)){x[C]=[]}x[C].push(D)}});B()});function A(I){var H=i(I),D=q(H),F=D[0],C;if(!D){return}C=r(y,F,H);if(!C){return}if(window.twttr&&H.getAttribute("href").indexOf("twitter.com/intent/")!==-1){H.setAttribute("href",C);return}if(F!="email"){var G=h(C);if(y.onOpen){y.onOpen(H,F,C,G)}if(y.onClose){var E=window.setInterval(function(){if(G.closed!==false){window.clearInterval(E);y.onClose(H,F,C,G)}},250)}}else{document.location=C}}function B(){var C,D;for(C in x){D=C.split(o);(function(E){t(D[0],D[1],y,function(F){for(var G in E){g(E[G],F)}})})(x[C])}}return this.nodes}};j=function(x){return new b(x)};function u(x){return j(x).share()}function l(x){if(document.readyState!="loading"){x()}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",x)}else{document.attachEvent("onreadystatechange",function(){if(document.readyState!="loading"){x()}})}}}function f(x){return document.querySelectorAll(x)}function e(z,y){for(var x=0;x<z.length;x++){y(z[x],x)}}function n(z,x,y){if(z.addEventListener){z.addEventListener(x,y)}else{z.attachEvent("on"+x,function(){y.call(z)})}}function p(z,x,y){if(z.removeEventListener){z.removeEventListener(x,y)}else{z.detachEvent("on"+x,y)}}function q(x){return x.className.match(s)}function i(y){var x=y||window.event;if(x.preventDefault){x.preventDefault()}else{x.returnValue=false;x.cancelBubble=true}return x.currentTarget||x.srcElement}function h(y){var z=575,x=400,D=(document.documentElement.clientWidth/2-z/2),C=(document.documentElement.clientHeight-x)/2,A="status=1,resizable=yes,width="+z+",height="+x+",top="+C+",left="+D,B=window.open(y,"",A);B.focus();return B}function r(H,A,z){var x,y=a(H,A,z),C=w(H,A,z,y),E=typeof y.title!=="undefined"?y.title:k(A),G=typeof y.text!=="undefined"?y.text:d(A),B=y.image?y.image:v("og:image"),F=typeof y.via!=="undefined"?y.via:v("twitter:site"),D={shareUrl:C,title:E,text:G,image:B,via:F,options:H,shareUrlEncoded:function(){return encodeURIComponent(this.shareUrl)}};switch(A){case"facebook":x="https://www.facebook.com/share.php?u="+D.shareUrlEncoded();break;case"twitter":x="https://twitter.com/intent/tweet?url="+D.shareUrlEncoded()+"&text="+encodeURIComponent(E+(G&&E?" - ":"")+G);if(F){x+="&via="+F.replace("@","")}break;case"google-plus":x="https://plus.google.com/share?url="+D.shareUrlEncoded();break;case"pinterest":x="https://pinterest.com/pin/create/button/?url="+D.shareUrlEncoded()+"&description="+encodeURIComponent(G);if(B){x+="&media="+encodeURIComponent(B)}break;case"tumblr":x="https://www.tumblr.com/share/link?url="+D.shareUrlEncoded()+"&name="+encodeURIComponent(E)+"&description="+encodeURIComponent(G);break;case"linkedin":x="https://www.linkedin.com/shareArticle?mini=true&url="+D.shareUrlEncoded()+"&title="+encodeURIComponent(E)+"&summary="+encodeURIComponent(G);break;case"vk":x="https://vkontakte.ru/share.php?url="+D.shareUrlEncoded();break;case"email":x="mailto:?subject="+encodeURIComponent(E)+"&body="+encodeURIComponent(E+"\n"+C+"\n\n"+G+"\n");break}D.networkUrl=x;if(H.onBeforeOpen){H.onBeforeOpen(z,A,D)}return D.networkUrl}function w(y,A,z,x){x=x||a(y,A,z);return x.url||window.location.href}function k(x){var y;if(x=="twitter"){y=v("twitter:title")}return y||document.title}function d(x){var y;if(x=="twitter"){y=v("twitter:description")}return y||v("description")}function v(z,y){var A,x=f("meta["+(y?y:z.indexOf("og:")===0?"property":"name")+'="'+z+'"]');if(x.length){A=x[0].getAttribute("content")||""}return A||""}function a(G,A,z){var y=["url","title","text","image"],x={},E,F,B,C,D=z.parentNode;A=="twitter"&&y.push("via");for(C in y){F=y[C];B="data-"+F;E=z.getAttribute(B)||D.getAttribute(B)||(G[A]&&typeof G[A][F]!="undefined"?G[A][F]:G[F]);if(typeof E!="undefined"){x[F]=E}}return x}function g(y,x){var z=document.createElement("div");z.innerHTML=x;z.className="ssk-num";y.appendChild(z)}function t(C,D,A,E){var z,y,x,B=encodeURIComponent(D);switch(C){case"facebook":z="https://graph.facebook.com/?id="+B;y=function(F){return E(F.shares?F.shares:0)};break;case"twitter":if(A&&A.twitter&&A.twitter.countCallback){A.twitter.countCallback(D,E)}break;case"google-plus":z="https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ";x='[{"method":"pos.plusones.get","id":"p","params":{"id":"'+D+'","userId":"@viewer","groupId":"@self","nolog":true},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]';y=function(F){F=JSON.parse(F);if(F.length){return E(F[0].result.metadata.globalCounts.count)}};m(z,y,x);return;case"linkedin":z="https://www.linkedin.com/countserv/count/share?url="+B;y=function(F){return E(F.count)};break;case"pinterest":z="https://api.pinterest.com/v1/urls/count.json?url="+B;y=function(F){return E(F.count)};break;case"vk":z="https://vk.com/share.php?act=count&url="+B;y=function(F){return E(F)};break}z&&y&&c(C,z,y,x)}function m(y,A,x){var z=new XMLHttpRequest();z.onreadystatechange=function(){if(this.readyState===4){if(this.status>=200&&this.status<400){A(this.responseText)}}};z.open("POST",y,true);z.setRequestHeader("Content-Type","application/json");z.send(x)}function c(z,y,B){var A="cb_"+z+"_"+Math.round(100000*Math.random()),x=document.createElement("script");window[A]=function(C){try{delete window[A]}catch(D){}document.body.removeChild(x);B(C)};if(z=="vk"){window.VK={Share:{count:function(D,C){window[A](C)}}}}else{if(z=="google-plus"){window.services={gplus:{cb:window[A]}}}}x.src=y+(y.indexOf("?")>=0?"&":"?")+"callback="+A;document.body.appendChild(x);return true}return{init:u}})();window.SocialShareKit=SocialShareKit;
var SocialShareKit=function(){function e(e){return k(e).share()}function t(e){"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!=document.readyState&&e()})}function n(e){return document.querySelectorAll(e)}function o(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}function r(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,function(){n.call(e)})}function i(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent("on"+t,n)}function a(e){return e.className.match(y)}function c(e){var t=e||window.event;return t.preventDefault?t.preventDefault():(t.returnValue=!1,t.cancelBubble=!0),t.currentTarget||t.srcElement}function u(e){var t=575,n=400,o=document.documentElement.clientWidth/2-t/2,r=(document.documentElement.clientHeight-n)/2,i="status=1,resizable=yes,width="+t+",height="+n+",top="+r+",left="+o,a=window.open(e,"",i);return a.focus(),a}function s(e,t,n){var o,r=f(e,t,n),i=d(e,t,n,r),a="undefined"!=typeof r.title?r.title:l(t),c="undefined"!=typeof r.text?r.text:p(t),u=r.image?r.image:h("og:image"),s="undefined"!=typeof r.via?r.via:h("twitter:site"),m={shareUrl:i,title:a,text:c,image:u,via:s,options:e,shareUrlEncoded:function(){return encodeURIComponent(this.shareUrl)}};switch(t){case"facebook":o="https://www.facebook.com/share.php?u="+m.shareUrlEncoded();break;case"twitter":o="https://twitter.com/intent/tweet?url="+m.shareUrlEncoded()+"&text="+encodeURIComponent(a+(c&&a?" - ":"")+c),s&&(o+="&via="+s.replace("@",""));break;case"google-plus":o="https://plus.google.com/share?url="+m.shareUrlEncoded();break;case"pinterest":o="https://pinterest.com/pin/create/button/?url="+m.shareUrlEncoded()+"&description="+encodeURIComponent(c),u&&(o+="&media="+encodeURIComponent(u));break;case"tumblr":o="https://www.tumblr.com/share/link?url="+m.shareUrlEncoded()+"&name="+encodeURIComponent(a)+"&description="+encodeURIComponent(c);break;case"linkedin":o="https://www.linkedin.com/shareArticle?mini=true&url="+m.shareUrlEncoded()+"&title="+encodeURIComponent(a)+"&summary="+encodeURIComponent(c);break;case"vk":o="https://vkontakte.ru/share.php?url="+m.shareUrlEncoded();break;case"email":o="mailto:?subject="+encodeURIComponent(a)+"&body="+encodeURIComponent(a+"\n"+i+"\n\n"+c+"\n")}return m.networkUrl=o,e.onBeforeOpen&&e.onBeforeOpen(n,t,m),m.networkUrl}function d(e,t,n,o){return o=o||f(e,t,n),o.url||window.location.href}function l(e){var t;return"twitter"==e&&(t=h("twitter:title")),t||document.title}function p(e){var t;return"twitter"==e&&(t=h("twitter:description")),t||h("description")}function h(e,t){var o,r=n("meta["+(t?t:0===e.indexOf("og:")?"property":"name")+'="'+e+'"]');return r.length&&(o=r[0].getAttribute("content")||""),o||""}function f(e,t,n){var o,r,i,a,c=["url","title","text","image"],u={},s=n.parentNode;"twitter"==t&&c.push("via");for(a in c)r=c[a],i="data-"+r,o=n.getAttribute(i)||s.getAttribute(i)||(e[t]&&"undefined"!=typeof e[t][r]?e[t][r]:e[r]),"undefined"!=typeof o&&(u[r]=o);return u}function m(e,t){var n=document.createElement("div");n.innerHTML=t,n.className="ssk-num",e.appendChild(n)}function w(e,t,n,o){var r,i,a,c=encodeURIComponent(t);switch(e){case"facebook":r="https://graph.facebook.com/?id="+c,i=function(e){return o(e.share?e.share.share_count:0)};break;case"twitter":n&&n.twitter&&n.twitter.countCallback&&n.twitter.countCallback(t,o);break;case"google-plus":return r="https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ",a='[{"method":"pos.plusones.get","id":"p","params":{"id":"'+t+'","userId":"@viewer","groupId":"@self","nolog":true},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]',i=function(e){if(e=JSON.parse(e),e.length)return o(e[0].result.metadata.globalCounts.count)},void v(r,i,a);case"linkedin":r="https://www.linkedin.com/countserv/count/share?url="+c,i=function(e){return o(e.count)};break;case"pinterest":r="https://api.pinterest.com/v1/urls/count.json?url="+c,i=function(e){return o(e.count)};break;case"vk":r="https://vk.com/share.php?act=count&url="+c,i=function(e){return o(e)}}r&&i&&g(e,r,i,a)}function v(e,t,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===this.readyState&&this.status>=200&&this.status<400&&t(this.responseText)},o.open("POST",e,!0),o.setRequestHeader("Content-Type","application/json"),o.send(n)}function g(e,t,n){var o="cb_"+e+"_"+Math.round(1e5*Math.random()),r=document.createElement("script");return window[o]=function(e){try{delete window[o]}catch(e){}document.body.removeChild(r),n(e)},"vk"==e?window.VK={Share:{count:function(e,t){window[o](t)}}}:"google-plus"==e&&(window.services={gplus:{cb:window[o]}}),r.src=t+(t.indexOf("?")>=0?"&":"?")+"callback="+o,document.body.appendChild(r),!0}var k,b,y=/(twitter|facebook|google-plus|pinterest|tumblr|vk|linkedin|email)/,C="*|*";return b=function(e){var t=e||{},o=t.selector||".ssk";this.nodes=n(o),this.options=t},b.prototype={share:function(){function e(e){var t,n=c(e),o=a(n),r=o[0];if(o&&(t=s(p,r,n))){if(window.twttr&&n.getAttribute("href").indexOf("twitter.com/intent/")!==-1)return void n.setAttribute("href",t);if("email"!=r){var i=u(t);if(p.onOpen&&p.onOpen(n,r,t,i),p.onClose)var d=window.setInterval(function(){i.closed!==!1&&(window.clearInterval(d),p.onClose(n,r,t,i))},250)}else document.location=t}}function n(){var e,t;for(e in h)t=e.split(C),function(e){w(t[0],t[1],p,function(t){for(var n in e)m(e[n],t)})}(h[e])}var l=this.nodes,p=this.options,h={};return t(function(){l.length&&(o(l,function(t){var n,o=a(t);o&&(i(t,"click",e),r(t,"click",e),t.parentNode.className.indexOf("ssk-count")!==-1&&(o=o[0],n=o+C+d(p,o,t),n in h||(h[n]=[]),h[n].push(t)))}),n())}),this.nodes}},k=function(e){return new b(e)},{init:e}}();window.SocialShareKit=SocialShareKit;
{
"name": "social-share-kit",
"version": "1.0.9",
"version": "1.0.10",
"description": "Library of decent and good looking CSS/JavaScript social sharing icons, buttons and popups",

@@ -5,0 +5,0 @@ "main": "dist/js/social-share-kit.min.js",

@@ -36,2 +36,2 @@ # [Social Share Kit](http://socialsharekit.com)

* If you are changing JavaScript `dist/js/social-share-kit.js` compression of the file into `dist/js/social-share-kit.min.js` is welcomed (with [yuicompressor](http://yui.github.io/yuicompressor/)), but not neccessary.
* If you are changing JavaScript `dist/js/social-share-kit.js` compression of the file into `dist/js/social-share-kit.min.js` is welcomed (with npm [uglify-js](https://www.npmjs.com/package/uglify-js) - `uglifyjs --compress --mangle --comments -- dist/js/social-share-kit.js > dist/js/social-share-kit.min.js`), but not neccessary.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc