Skip to content

Instantly share code, notes, and snippets.

@chiplay
Created May 15, 2013 01:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chiplay/5581038 to your computer and use it in GitHub Desktop.
AddThis Backbone Init
initAddThis: function() {
var addthis_config =
{
data_track_clickback: true,
data_ga_property: 'UA-xxxxxxx-x',
data_ga_social : true
};
var addthis_share =
{
url: window.location.protocol+'//'+window.location.host + App.Views.singleEntry.slug + '/' + App.Views.singleEntry.model.get('url_title') + '/',
title: App.Views.singleEntry.model.get('title'),
description: App.Views.singleEntry.model.get('content_teaser')
};
if (window.addthis){
window.addthis.toolbox("#addthis_toolbox", addthis_config, addthis_share);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment