Show "Dead" instead of the page number when the thread 404s.
This commit is contained in:
parent
029a2dac2c
commit
0f742f0d0b
@ -35,7 +35,10 @@ ThreadStats =
|
|||||||
(if thread.postLimit and !thread.isSticky then $.addClass else $.rmClass) postCountEl, 'warning'
|
(if thread.postLimit and !thread.isSticky then $.addClass else $.rmClass) postCountEl, 'warning'
|
||||||
(if thread.fileLimit and !thread.isSticky then $.addClass else $.rmClass) fileCountEl, 'warning'
|
(if thread.fileLimit and !thread.isSticky then $.addClass else $.rmClass) fileCountEl, 'warning'
|
||||||
fetchPage: ->
|
fetchPage: ->
|
||||||
return if ThreadStats.thread.isDead
|
if ThreadStats.thread.isDead
|
||||||
|
ThreadStats.pageCountEl.textContent = 'Dead'
|
||||||
|
$.addClass ThreadStats.pageCountEl, 'warning'
|
||||||
|
return
|
||||||
setTimeout ThreadStats.fetchPage, 2 * $.MINUTE
|
setTimeout ThreadStats.fetchPage, 2 * $.MINUTE
|
||||||
$.ajax "//api.4chan.org/#{ThreadStats.thread.board}/threads.json", onload: ThreadStats.onThreadsLoad,
|
$.ajax "//api.4chan.org/#{ThreadStats.thread.board}/threads.json", onload: ThreadStats.onThreadsLoad,
|
||||||
headers: 'If-Modified-Since': ThreadStats.lastModified
|
headers: 'If-Modified-Since': ThreadStats.lastModified
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user