fixes after revert

This commit is contained in:
Jeena 2014-02-21 11:48:49 +01:00
parent 01cb207b65
commit 2d5e1f00e7
4 changed files with 24 additions and 9 deletions

View file

@ -7,6 +7,16 @@ function App() {
if(!color) color = "red";
this.setColor(color);
this.fontChange();
var _this = this;
window.onkeydown = function(e) {
if(e.keyCode == 39) {
_this.showNext();
} else if(e.keyCode == 37) {
_this.showPrevious();
}
}
};
App.prototype.authenticate = function() {
@ -276,9 +286,9 @@ App.prototype.showFull = function(article, slide_back) {
$(page_id + " .date").innerHTML = (new Date(parseInt(article.updated, 10) * 1000)).toLocaleString();
var title = $(page_id + " .title");
title.innerHTML = article.title;
title.href = article.link;
var link = $(page_id + " .link");
link.innerHTML = article.link;
link.href = article.link;
$(page_id + " .feed_title").innerHTML = article.feed_title;
@ -286,7 +296,9 @@ App.prototype.showFull = function(article, slide_back) {
if(article.author && article.author.length > 0)
$(page_id + " .author").innerHTML = "– " + article.author;
$(page_id + " .article").innerHTML = article.content;
var content = article.content;
if(content.replace(/^\s+|\s+$/g,'').length == 0) content = article.title;
$(page_id + " .article").innerHTML = content;
$$(page_id + " .article a").forEach(function(o, i) {
o.target = "_blank";
});

View file

@ -76,7 +76,7 @@ Pond.prototype.reload = function(callback) {
Pond.prototype.getUnreadFeeds = function(callback, skip) {
var options = {
status: "all",
status: "unread",
limit: 100
};
@ -134,8 +134,6 @@ Pond.prototype.normalizeArticle = function(article) {
var timestamp = new Date(article.published_at).getTime() / 1000;
console.log(article.read)
return {
id: article.id,
guid_hash: article.url + article.id,