Make Main.initStyle start sooner on the catalog.

This commit is contained in:
Mayhem 2013-05-08 23:09:40 +02:00
parent 17b4a6a2f9
commit fd5abbc355
2 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ Header =
return unless Main.isThisPageLegit()
# Wait for #boardNavMobile instead of #boardNavDesktop,
# it might be incomplete otherwise.
$.asap (-> $.id('boardNavMobile') or d.readyState is 'complete'), Header.setBoardList
$.asap (-> $.id('boardNavMobile') or d.readyState in ['interactive', 'complete']), Header.setBoardList
$.prepend d.body, headerEl
$.ready ->

View File

@ -18,7 +18,8 @@ Main =
Conf['archives'] = Redirect.archives
$.get Conf, Main.initFeatures
$.on d, '4chanMainInit', Main.initStyle
$.asap (-> d.head and $('link[rel="shortcut icon"]', d.head) or d.readyState in ['interactive', 'complete']),
Main.initStyle
initFeatures: (items) ->
Conf = items
@ -118,7 +119,6 @@ Main =
$.ready Main.initReady
initStyle: ->
$.off d, '4chanMainInit', Main.initStyle
return unless Main.isThisPageLegit()
# disable the mobile layout
$('link[href*=mobile]', d.head)?.disabled = true