Fix 4chan-specific error page detection.
This commit is contained in:
parent
2fb01f85b6
commit
792eef9e54
@ -406,11 +406,12 @@ Main =
|
|||||||
<%= html('<span class="report-error"> [<a href="${url}" target="_blank">report</a>]</span>') %>
|
<%= html('<span class="report-error"> [<a href="${url}" target="_blank">report</a>]</span>') %>
|
||||||
|
|
||||||
isThisPageLegit: ->
|
isThisPageLegit: ->
|
||||||
# 404 error page or similar.
|
# not 404 error page or similar.
|
||||||
unless 'thisPageIsLegit' of Main
|
unless 'thisPageIsLegit' of Main
|
||||||
Main.thisPageIsLegit = location.hostname is 'boards.4chan.org' and
|
Main.thisPageIsLegit = if Site.isThisPageLegit
|
||||||
!$('link[href*="favicon-status.ico"]', d.head) and
|
Site.isThisPageLegit()
|
||||||
d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out']
|
else
|
||||||
|
!/^[45]\d\d\b/.test(document.title)
|
||||||
Main.thisPageIsLegit
|
Main.thisPageIsLegit
|
||||||
|
|
||||||
ready: (cb) ->
|
ready: (cb) ->
|
||||||
|
|||||||
@ -1 +1,6 @@
|
|||||||
SW.yotsuba = {}
|
SW.yotsuba =
|
||||||
|
isThisPageLegit: ->
|
||||||
|
# not 404 error page or similar.
|
||||||
|
location.hostname is 'boards.4chan.org' and
|
||||||
|
!$('link[href*="favicon-status.ico"]', d.head) and
|
||||||
|
d.title not in ['4chan - Temporarily Offline', '4chan - Error', '504 Gateway Time-out']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user