social-share-kit
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "social-share-kit", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"homepage": "http://socialsharekit.com/", | ||
@@ -5,0 +5,0 @@ "authors": [ |
/*! | ||
* Social Share Kit v1.0.8 (http://socialsharekit.com) | ||
* Social Share Kit v1.0.9 (http://socialsharekit.com) | ||
* Copyright 2015 Social Share Kit / Kaspars Sprogis. | ||
@@ -4,0 +4,0 @@ * Licensed under Creative Commons Attribution-NonCommercial 3.0 license: |
/*! | ||
* Social Share Kit v1.0.8 (http://socialsharekit.com) | ||
* Social Share Kit v1.0.9 (http://socialsharekit.com) | ||
* Copyright 2015 Social Share Kit / Kaspars Sprogis. | ||
@@ -8,2 +8,2 @@ * Licensed under Creative Commons Attribution-NonCommercial 3.0 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(){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; |
{ | ||
"name": "social-share-kit", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Library of decent and good looking CSS/JavaScript social sharing icons, buttons and popups", | ||
"main": [ | ||
"dist/js/social-share-kit.min.js", | ||
"dist/css/social-share-kit.css" | ||
], | ||
"main": "dist/js/social-share-kit.min.js", | ||
"repository": { | ||
@@ -10,0 +7,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
170464
427
4