Don't fire 4chanXInitFinished until JSON Index has loaded.
This commit is contained in:
parent
420368219c
commit
da1fce6646
@ -261,11 +261,15 @@ Main =
|
|||||||
new Notice 'warning', msg
|
new Notice 'warning', msg
|
||||||
|
|
||||||
# Parse HTML or skip it and start building from JSON.
|
# Parse HTML or skip it and start building from JSON.
|
||||||
unless Conf['JSON Index'] and g.VIEW is 'index'
|
unless Index.root
|
||||||
Main.initThread()
|
Main.initThread()
|
||||||
else
|
else if Index.root.firstElementChild and doc.contains(Index.root)
|
||||||
Main.expectInitFinished = true
|
Main.expectInitFinished = true
|
||||||
$.event '4chanXInitFinished'
|
$.event '4chanXInitFinished'
|
||||||
|
else
|
||||||
|
$.one d, 'PostsInserted', ->
|
||||||
|
Main.expectInitFinished = true
|
||||||
|
$.event '4chanXInitFinished'
|
||||||
|
|
||||||
initThread: ->
|
initThread: ->
|
||||||
if (board = $ '.board')
|
if (board = $ '.board')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user