app/assets/javascripts/livefyre.js in livefyre-0.1.1 vs app/assets/javascripts/livefyre.js in livefyre-0.1.2

- old
+ new

@@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.6.3 (function() { var cookie, defaultDelegate, load, utils, _initialized; defaultDelegate = function(options) { var authDelegate, k, v, _ref; @@ -87,11 +87,11 @@ return this.timer = setInterval(function() { return _this.__checkLogin(); }, 100); }, __checkLogin: function() { - var token; + var err, token; token = cookie(options.cookie_name || "livefyre_utoken"); if (token && this.timer) { clearInterval(this.timer); if (this.popup) { this.popup.close(); @@ -108,12 +108,12 @@ if (this.tries > 30) { clearInterval(this.timer); this.timer = null; return this.popup = null; } - } catch (err) { - + } catch (_error) { + err = _error; } } } }; }; @@ -131,10 +131,11 @@ options.config || (options.config = { checksum: e.getAttribute("data-checksum"), collectionMeta: e.getAttribute("data-collection-meta"), articleId: e.getAttribute("data-article-id"), siteId: e.getAttribute("data-site-id"), + postToButtons: JSON.parse(e.getAttribute("data-post-to-buttons")), el: e.id }); options.network || (options.network = e.getAttribute("data-network")); options.domain || (options.domain = e.getAttribute("data-domain")); options.root || (options.root = e.getAttribute("data-root")); @@ -146,17 +147,19 @@ } opts = { network: options.network, authDelegate: options.delegate || defaultDelegate(options) }; + console.log(options.config); return fyre.conv.load(opts, [options.config], function(widget) { - var token; + var error, token; returnable.widget = widget; token = cookie(options.cookie_name || "livefyre_utoken"); if (token) { try { return fyre.conv.login(token); - } catch (error) { + } catch (_error) { + error = _error; if (window.console) { return window.console.log("Error logging in:", e); } } }