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.
This commit is contained in:
Mayhem 2013-12-12 02:18:53 +01:00
parent 3928ae08e0
commit f34288511b

View File

@ -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) ->