From 3a415a45a96b5260ca4bc25b56da117dd0432a98 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Tue, 11 Nov 2014 17:52:03 -0700 Subject: [PATCH] feat(sharing): add download link --- public/js/controllers/footerCtrl.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/js/controllers/footerCtrl.js b/public/js/controllers/footerCtrl.js index 2a043f52f8..afd7ca0229 100644 --- a/public/js/controllers/footerCtrl.js +++ b/public/js/controllers/footerCtrl.js @@ -40,7 +40,16 @@ if (!window.env.IS_MOBILE) { // Add This - FIXME why isn't this working when here? instead it's now in //$.getScript("//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5016f6cc44ad68a4"); - window.addthis_options = 'facebook,twitter,googleplus,tumblr'; + var addthisServices = 'facebook,twitter,googleplus,tumblr,'+window.env.BASE_URL.replace('https://','').replace('http://',''); + window.addthis_config = { + services_custom:{ + name: "Download", + url: window.env.BASE_URL+"/export/avatar-"+User.user._id+".png", + icon: window.env.BASE_URL+"/favicon.ico" + }, + services_expanded:addthisServices, + services_compact:addthisServices + }; // Google Charts $.getScript("//www.google.com/jsapi", function() {