diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/twitter-bin.js --- a/client/js/twitter-bin.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/twitter-bin.js Tue Apr 23 22:53:01 2013 +0200 @@ -1,18 +1,18 @@ Rkns.Twitter = { -} +}; Rkns.Twitter.Search = function(_renkan, _opts) { this.renkan = _renkan; this.opts = _opts; -} +}; Rkns.Twitter.Search.prototype.getBgClass = function() { return "Rk-Twitter-Icon"; -} +}; Rkns.Twitter.Search.prototype.getSearchTitle = function() { return this.renkan.translate("Twitter"); -} +}; Rkns.Twitter.Search.prototype.search = function(_q) { this.renkan.tabs.push( @@ -20,7 +20,7 @@ search: _q }) ); -} +}; Rkns.Twitter.Bin = Rkns.Utils.inherit(Rkns._BaseBin); @@ -43,7 +43,7 @@ this.title_icon_$.addClass('Rk-Twitter-Title-Icon'); this.title_$.html(this.search).addClass("Rk-Twitter-Title"); this.refresh(); -} +}; Rkns.Twitter.Bin.prototype.render = function(searchstr) { var _rgxp = new RegExp('('+(searchstr || this.search).replace(/(\W)/g,'\\$1')+')','gi'); @@ -53,7 +53,7 @@ function highlight(_text) { return _text.replace(_rgxp, "$1"); } - var _html = "" + var _html = "", _this = this, count = 0; Rkns._(this.data.results).each(function(_result) { @@ -94,7 +94,7 @@ } } - var _urls = _result.text.match(/(www\.|https?:\/\/)[\w./_\-]+/gim), + var _urls = _result.text.match(/(www\.|https?:\/\/)[\w.\/_\-]+/gim), _lastpos = 0; if (_urls) { for (var _i = 0; _i < _urls.length; _i++) { @@ -109,7 +109,7 @@ }); } } - _entities = Rkns._(_entities).sortBy(function(a) { return a.start }); + _entities = Rkns._(_entities).sortBy(function(a) { return a.start; }); var _lastend = 0, _text = Rkns._(_entities).map(function(_e) { var _txt = highlight(_result.text.substring(_lastend, _e.start)) + _e.link + highlight(_e.text) + ''; @@ -135,7 +135,7 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.Twitter.Bin.prototype.refresh = function() { var _this = this; @@ -151,4 +151,4 @@ _this.render(); } }); -} +};