addthis-snippet

Load addthis.com snippet asynchronously.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
addthis-snippet
201.0.25 years ago6 years agoMinified + gzip package size for addthis-snippet in KB

Readme

!NPM versionnpm-imagenpm-url !Dependency Statusgemnasium-imagegemnasium-url
addthis
Load addthis.com snippet asynchronously.

Install

$ npm install --save addthis-snippet

Usage

var addthis = require('addthis-snippet');

var config = {
    pubid: 'ra-XXXXXXXXXXXX'
};

var share = {
  passthrough : {
    twitter: {
      via: "TWITTER USERNAME"
    }
  }
};

addthis(config, share, function () {
  // window.addthis is now set and can be used to further configure addthis
});

API

addthis(addthis_config, addthis_share, callback)

License

MIT © Damian Krzeminski