diff --git a/js/App.js b/js/App.js index 593ba29..d2cb11e 100644 --- a/js/App.js +++ b/js/App.js @@ -15,6 +15,10 @@ function App() { _this.showNext(); } else if(e.keyCode == 37) { _this.showPrevious(); + } else if(e.keyCode == 13) { + _this.openInBrowser(); + } else if(e.keyCode == 82) { + _this.reload(); } } }; @@ -298,7 +302,7 @@ App.prototype.showFull = function(article, slide_back) { var content = article.content; if(content.replace(/^\s+|\s+$/g,'').length == 0) content = article.title; - $(page_id + " .article").innerHTML = content; + $(page_id + " .article").innerHTML = content.urlify(); $$(page_id + " .article a").forEach(function(o, i) { o.target = "_blank"; }); @@ -339,6 +343,10 @@ App.prototype.showPrevious = function() { } }; +App.prototype.openInBrowser = function() { + $("#full .link").click(); +}; + App.prototype.setCurrentRead = function() { var article = this.unread_articles[this.currentIndex]; if(!article) return; // happens if we're not on a full article site