diff --git a/bower.json b/bower.json index 24a0142..3e8e6aa 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "social-share-kit", - "version": "1.0.8", + "version": "1.0.9", "homepage": "http://socialsharekit.com/", "authors": [ "Kaspars Sprogis " diff --git a/dist/js/social-share-kit.js b/dist/js/social-share-kit.js index bed157c..533223b 100644 --- a/dist/js/social-share-kit.js +++ b/dist/js/social-share-kit.js @@ -1,5 +1,5 @@ /*! - * 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. * Licensed under Creative Commons Attribution-NonCommercial 3.0 license: * https://github.com/darklow/social-share-kit/blob/master/LICENSE diff --git a/dist/js/social-share-kit.min.js b/dist/js/social-share-kit.min.js index f6bff63..a48785c 100644 --- a/dist/js/social-share-kit.min.js +++ b/dist/js/social-share-kit.min.js @@ -1,8 +1,8 @@ /*! - * 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. * 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=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; \ No newline at end of file +;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=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; diff --git a/docs/index.html b/docs/index.html index 0cc040a..c331d48 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,10 +11,10 @@ - + - + @@ -1020,7 +1020,7 @@ - +