Huge News!Announcing our $40M Series B led by Abstract Ventures.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.14 to 1.0.15

2

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

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

/*!
* Social Share Kit v1.0.14 (http://socialsharekit.com)
* Social Share Kit v1.0.15 (http://socialsharekit.com)
* Copyright 2015 Social Share Kit / Kaspars Sprogis.

@@ -38,6 +38,10 @@ * @Licensed under Creative Commons Attribution-NonCommercial 3.0 license:

if (el.getAttribute('data-ssk-ready'))
return;
if (options.reinitialize && el._skkListener) {
removeEventListener(el, 'click', el._skkListener);
} else
return;
el.setAttribute('data-ssk-ready', true);
addEventListener(el, 'click', onClick);
el._skkListener = onClick

@@ -169,2 +173,9 @@ // Gather icons with share counts

function removeEventListener(el, eventName, handler) {
if (el.removeEventListener)
el.removeEventListener(eventName, handler);
else
el.detachEvent('on' + eventName, handler);
}
function elSupportsShare(el) {

@@ -171,0 +182,0 @@ return el.className.match(supportsShare);

/*!
* Social Share Kit v1.0.14 (http://socialsharekit.com)
* Social Share Kit v1.0.15 (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(){function e(e){return b(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){return e.className.match(g)}function a(e){var t=e||window.event;return t.preventDefault?t.preventDefault():(t.returnValue=!1,t.cancelBubble=!0),t.currentTarget||t.srcElement}function c(e,t,n){var o,r,i,a;return t&&n?(r=document.documentElement.clientWidth/2-t/2,i=(document.documentElement.clientHeight-n)/2,a="status=1,resizable=yes,width="+t+",height="+n+",top="+i+",left="+r,o=window.open(e,"",a)):o=window.open(e),o.focus(),o}function s(e,t,n){var o,r=f(e,t,n),i=u(e,t,n,r),a="undefined"!=typeof r.title?r.title:d(t),c="undefined"!=typeof r.text?r.text:l(t),s=r.image?r.image:p("og:image"),h="undefined"!=typeof r.via?r.via:p("twitter:site"),m={shareUrl:i,title:a,text:c,image:s,via:h,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),h&&(o+="&via="+h.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),s&&(o+="&media="+encodeURIComponent(s));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"buffer":o="https://buffer.com/add?source=button&url="+m.shareUrlEncoded()+"&text="+encodeURIComponent(c);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 u(e,t,n,o){return o=o||f(e,t,n),o.url||window.location.href}function d(e){var t;return"twitter"==e&&(t=p("twitter:title")),t||document.title}function l(e){var t;return"twitter"==e&&(t=p("twitter:description")),t||p("description")}function p(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"],s={},u=n.parentNode;"twitter"==t&&c.push("via");for(a in c)r=c[a],i="data-"+r,o=n.getAttribute(i)||u.getAttribute(i)||(e[t]&&"undefined"!=typeof e[t][r]?e[t][r]:e[r]),"undefined"!=typeof o&&(s[r]=o);return s}function h(e,t){var n=document.createElement("div");n.innerHTML=t,n.className="ssk-num",e.appendChild(n)}function m(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 w(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)};break;case"buffer":r="https://api.bufferapp.com/1/links/shares.json?url="+c,i=function(e){return o(e.shares)}}r&&i&&v(e,r,i,a)}function w(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 v(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 b,k,g=/(twitter|facebook|google-plus|pinterest|tumblr|vk|linkedin|buffer|email)/,y="*|*";return k=function(e){var t=e||{},o=t.selector||".ssk";this.nodes=n(o),this.options=t},k.prototype={share:function(){function e(e){var t,n=a(e),o=i(n),r=o[0];if(o&&(t=s(l,r,n))){if(window.twttr&&n.getAttribute("href").indexOf("twitter.com/intent/")!==-1)return void n.setAttribute("href",t);if("email"!==r){var u,d;"buffer"===r?(u=800,d=680):(u=575,d=400);var p=c(t,u,d);if(l.onOpen&&l.onOpen(n,r,t,p),l.onClose)var f=window.setInterval(function(){p.closed!==!1&&(window.clearInterval(f),l.onClose(n,r,t,p))},250)}else document.location=t}}function n(){var e,t;for(e in p)t=e.split(y),function(e){m(t[0],t[1],l,function(t){for(var n in e)h(e[n],t)})}(p[e])}var d=this.nodes,l=this.options,p={},f=function(){d.length&&(o(d,function(t){var n,o=i(t);o&&(t.getAttribute("data-ssk-ready")||(t.setAttribute("data-ssk-ready",!0),r(t,"click",e),t.parentNode.className.indexOf("ssk-count")!==-1&&(o=o[0],n=o+y+u(l,o,t),n in p||(p[n]=[]),p[n].push(t))))}),n())};return l.forceInit===!0?f():t(f),this.nodes}},b=function(e){return new k(e)},{init:e}}();window.SocialShareKit=SocialShareKit;
var SocialShareKit=function(){function e(e){return b(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 r(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}function o(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 s(e,t,n){var r,o,i,a;return t&&n?(o=document.documentElement.clientWidth/2-t/2,i=(document.documentElement.clientHeight-n)/2,a="status=1,resizable=yes,width="+t+",height="+n+",top="+i+",left="+o,r=window.open(e,"",a)):r=window.open(e),r.focus(),r}function u(e,t,n){var r,o=h(e,t,n),i=d(e,t,n,o),a="undefined"!=typeof o.title?o.title:l(t),c="undefined"!=typeof o.text?o.text:p(t),s=o.image?o.image:f("og:image"),u="undefined"!=typeof o.via?o.via:f("twitter:site"),m={shareUrl:i,title:a,text:c,image:s,via:u,options:e,shareUrlEncoded:function(){return encodeURIComponent(this.shareUrl)}};switch(t){case"facebook":r="https://www.facebook.com/share.php?u="+m.shareUrlEncoded();break;case"twitter":r="https://twitter.com/intent/tweet?url="+m.shareUrlEncoded()+"&text="+encodeURIComponent(a+(c&&a?" - ":"")+c),u&&(r+="&via="+u.replace("@",""));break;case"google-plus":r="https://plus.google.com/share?url="+m.shareUrlEncoded();break;case"pinterest":r="https://pinterest.com/pin/create/button/?url="+m.shareUrlEncoded()+"&description="+encodeURIComponent(c),s&&(r+="&media="+encodeURIComponent(s));break;case"tumblr":r="https://www.tumblr.com/share/link?url="+m.shareUrlEncoded()+"&name="+encodeURIComponent(a)+"&description="+encodeURIComponent(c);break;case"linkedin":r="https://www.linkedin.com/shareArticle?mini=true&url="+m.shareUrlEncoded()+"&title="+encodeURIComponent(a)+"&summary="+encodeURIComponent(c);break;case"vk":r="https://vkontakte.ru/share.php?url="+m.shareUrlEncoded();break;case"buffer":r="https://buffer.com/add?source=button&url="+m.shareUrlEncoded()+"&text="+encodeURIComponent(c);break;case"email":r="mailto:?subject="+encodeURIComponent(a)+"&body="+encodeURIComponent(a+"\n"+i+"\n\n"+c+"\n")}return m.networkUrl=r,e.onBeforeOpen&&e.onBeforeOpen(n,t,m),m.networkUrl}function d(e,t,n,r){return r=r||h(e,t,n),r.url||window.location.href}function l(e){var t;return"twitter"==e&&(t=f("twitter:title")),t||document.title}function p(e){var t;return"twitter"==e&&(t=f("twitter:description")),t||f("description")}function f(e,t){var r,o=n("meta["+(t?t:0===e.indexOf("og:")?"property":"name")+'="'+e+'"]');return o.length&&(r=o[0].getAttribute("content")||""),r||""}function h(e,t,n){var r,o,i,a,c=["url","title","text","image"],s={},u=n.parentNode;"twitter"==t&&c.push("via");for(a in c)o=c[a],i="data-"+o,r=n.getAttribute(i)||u.getAttribute(i)||(e[t]&&"undefined"!=typeof e[t][o]?e[t][o]:e[o]),"undefined"!=typeof r&&(s[o]=r);return s}function m(e,t){var n=document.createElement("div");n.innerHTML=t,n.className="ssk-num",e.appendChild(n)}function w(e,t,n,r){var o,i,a,c=encodeURIComponent(t);switch(e){case"facebook":o="https://graph.facebook.com/?id="+c,i=function(e){return r(e.share?e.share.share_count:0)};break;case"twitter":n&&n.twitter&&n.twitter.countCallback&&n.twitter.countCallback(t,r);break;case"google-plus":return o="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 r(e[0].result.metadata.globalCounts.count)},void v(o,i,a);case"linkedin":o="https://www.linkedin.com/countserv/count/share?url="+c,i=function(e){return r(e.count)};break;case"pinterest":o="https://api.pinterest.com/v1/urls/count.json?url="+c,i=function(e){return r(e.count)};break;case"vk":o="https://vk.com/share.php?act=count&url="+c,i=function(e){return r(e)};break;case"buffer":o="https://api.bufferapp.com/1/links/shares.json?url="+c,i=function(e){return r(e.shares)}}o&&i&&k(e,o,i,a)}function v(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===this.readyState&&this.status>=200&&this.status<400&&t(this.responseText)},r.open("POST",e,!0),r.setRequestHeader("Content-Type","application/json"),r.send(n)}function k(e,t,n){var r="cb_"+e+"_"+Math.round(1e5*Math.random()),o=document.createElement("script");return window[r]=function(e){try{delete window[r]}catch(e){}document.body.removeChild(o),n(e)},"vk"==e?window.VK={Share:{count:function(e,t){window[r](t)}}}:"google-plus"==e&&(window.services={gplus:{cb:window[r]}}),o.src=t+(t.indexOf("?")>=0?"&":"?")+"callback="+r,document.body.appendChild(o),!0}var b,g,y=/(twitter|facebook|google-plus|pinterest|tumblr|vk|linkedin|buffer|email)/,U="*|*";return g=function(e){var t=e||{},r=t.selector||".ssk";this.nodes=n(r),this.options=t},g.prototype={share:function(){function e(e){var t,n=c(e),r=a(n),o=r[0];if(r&&(t=u(p,o,n))){if(window.twttr&&n.getAttribute("href").indexOf("twitter.com/intent/")!==-1)return void n.setAttribute("href",t);if("email"!==o){var i,d;"buffer"===o?(i=800,d=680):(i=575,d=400);var l=s(t,i,d);if(p.onOpen&&p.onOpen(n,o,t,l),p.onClose)var f=window.setInterval(function(){l.closed!==!1&&(window.clearInterval(f),p.onClose(n,o,t,l))},250)}else document.location=t}}function n(){var e,t;for(e in f)t=e.split(U),function(e){w(t[0],t[1],p,function(t){for(var n in e)m(e[n],t)})}(f[e])}var l=this.nodes,p=this.options,f={},h=function(){l.length&&(r(l,function(t){var n,r=a(t);if(r){if(t.getAttribute("data-ssk-ready")){if(!p.reinitialize||!t._skkListener)return;i(t,"click",t._skkListener)}t.setAttribute("data-ssk-ready",!0),o(t,"click",e),t._skkListener=e,t.parentNode.className.indexOf("ssk-count")!==-1&&(r=r[0],n=r+U+d(p,r,t),n in f||(f[n]=[]),f[n].push(t))}}),n())};return p.forceInit===!0?h():t(h),this.nodes}},b=function(e){return new g(e)},{init:e}}();window.SocialShareKit=SocialShareKit;
{
"name": "social-share-kit",
"version": "1.0.14",
"version": "1.0.15",
"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",

# [Social Share Kit](http://socialsharekit.com)
[![CDNJS](https://img.shields.io/cdnjs/v/social-share-kit.svg)](https://cdnjs.com/libraries/social-share-kit)
[![npm](https://img.shields.io/npm/v/social-share-kit.svg)](https://www.npmjs.com/package/social-share-kit)

@@ -4,0 +5,0 @@ Social Share Kit is a library of decent and good looking CSS/JavaScript social sharing icons, buttons and popups.

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

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

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