Do 404 redirect for threads left over as stubs.
This commit is contained in:
parent
4a456548f6
commit
68bd81ccde
@ -162,17 +162,19 @@ Main =
|
|||||||
attributeFilter: ['href']
|
attributeFilter: ['href']
|
||||||
|
|
||||||
initReady: ->
|
initReady: ->
|
||||||
if d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
# XXX Sometimes threads don't 404 but are left over as stubs containing one garbage reply post.
|
||||||
if g.VIEW is 'thread'
|
if g.VIEW is 'thread' and not $ '.opContainer'
|
||||||
ThreadWatcher.set404 g.BOARD.ID, g.THREADID, ->
|
ThreadWatcher.set404 g.BOARD.ID, g.THREADID, ->
|
||||||
if Conf['404 Redirect']
|
if Conf['404 Redirect']
|
||||||
Redirect.navigate 'thread',
|
Redirect.navigate 'thread',
|
||||||
boardID: g.BOARD.ID
|
boardID: g.BOARD.ID
|
||||||
threadID: g.THREADID
|
threadID: g.THREADID
|
||||||
postID: +location.hash.match /\d+/ # post number or 0
|
postID: +location.hash.match /\d+/ # post number or 0
|
||||||
, "/#{g.BOARD}/"
|
, "/#{g.BOARD}/"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
return if d.title in ['4chan - Temporarily Offline', '4chan - 404 Not Found']
|
||||||
|
|
||||||
# 4chan Pass Link
|
# 4chan Pass Link
|
||||||
if styleSelector = $.id 'styleSelector'
|
if styleSelector = $.id 'styleSelector'
|
||||||
passLink = $.el 'a',
|
passLink = $.el 'a',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user