From 8829863439dc6020ddb16bcc4e84651c29d947e9 Mon Sep 17 00:00:00 2001 From: benweet Date: Sun, 16 Feb 2014 16:42:01 +0000 Subject: [PATCH] Removed bitly shortening --- public/res/sharing.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/public/res/sharing.js b/public/res/sharing.js index 575934cc..f31ddcf0 100644 --- a/public/res/sharing.js +++ b/public/res/sharing.js @@ -37,6 +37,8 @@ define([ callback(); return; } + // Twitter does that for us + /* var task = new AsyncTask(); var shortUrl; task.onRun(function() { @@ -77,6 +79,20 @@ define([ task.onSuccess(onFinish); task.onError(onFinish); task.enqueue(); + */ + var url = [ + constants.MAIN_URL, + 'viewer#!provider=', + provider.providerId + ]; + _.each(provider.sharingAttributes, function(attributeName) { + url.push('&'); + url.push(attributeName); + url.push('='); + url.push(encodeURIComponent(attributes[attributeName])); + }); + attributes.sharingLink = url.join(''); + callback(); }; eventMgr.addListener("onReady", function() {