summaryrefslogtreecommitdiff
path: root/digest.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-09-13 18:32:34 +0400
committerAndrew Dolgov <[email protected]>2010-09-13 18:32:34 +0400
commite638cd0201f1de0ec3c5fb42b63ca64f39ed67ed (patch)
tree8117bc72fac7653726d3fc314bc7ab388c65d842 /digest.js
parent9a4dd417c4db9e3f752ee571fd67bb0ef04a45cf (diff)
digest: properly mark fresh articles
Diffstat (limited to 'digest.js')
-rw-r--r--digest.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/digest.js b/digest.js
index 8659c8fb3..cb42633b6 100644
--- a/digest.js
+++ b/digest.js
@@ -405,7 +405,15 @@ function add_headline_entry(article, feed, no_effects) {
if (article.excerpt.trim() == "")
article.excerpt = __("Click to expand article.");
- var tmp_html = "<li id=\"A-"+article.id+"\" "+style+" class=\"unread\">" +
+ var li_class = "unread";
+
+ var fresh_max = getInitParam("fresh_article_max_age") * 60 * 60;
+ var d = new Date();
+
+ if (d.getTime() / 1000 - article.updated < fresh_max)
+ li_class = "fresh";
+
+ var tmp_html = "<li id=\"A-"+article.id+"\" "+style+" class=\""+li_class+"\">" +
icon_part +
"<div class='digest-check'>" +