From f34288511be158d530a43de66d7943cd6a922375 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 12 Dec 2013 02:18:53 +0100 Subject: [PATCH] Use the Last-Modified header's date for the index refresh timer. Instead of showing how long has it been since we refreshed the index, we show how long has it been since the index has changed on 4chan's side. That'll be a more meaningful timer when 4chan freezes for example. --- src/General/Index.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 8f79f133c..06d19b3e8 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -249,7 +249,7 @@ Index = setTimeout notice.close, $.SECOND timeEl = $ '#index-last-refresh', Index.navLinks - timeEl.dataset.utc = e.timeStamp <% if (type === 'userscript') { %>/ 1000<% } %> + timeEl.dataset.utc = Date.parse req.getResponseHeader 'Last-Modified' RelativeDates.update timeEl Index.scrollToIndex() parse: (pages, pageNum) ->