Make Main.initStyle start sooner on the catalog.
This commit is contained in:
parent
17b4a6a2f9
commit
fd5abbc355
@ -74,7 +74,7 @@ Header =
|
|||||||
return unless Main.isThisPageLegit()
|
return unless Main.isThisPageLegit()
|
||||||
# Wait for #boardNavMobile instead of #boardNavDesktop,
|
# Wait for #boardNavMobile instead of #boardNavDesktop,
|
||||||
# it might be incomplete otherwise.
|
# 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
|
$.prepend d.body, headerEl
|
||||||
|
|
||||||
$.ready ->
|
$.ready ->
|
||||||
|
|||||||
@ -18,7 +18,8 @@ Main =
|
|||||||
Conf['archives'] = Redirect.archives
|
Conf['archives'] = Redirect.archives
|
||||||
$.get Conf, Main.initFeatures
|
$.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) ->
|
initFeatures: (items) ->
|
||||||
Conf = items
|
Conf = items
|
||||||
@ -118,7 +119,6 @@ Main =
|
|||||||
$.ready Main.initReady
|
$.ready Main.initReady
|
||||||
|
|
||||||
initStyle: ->
|
initStyle: ->
|
||||||
$.off d, '4chanMainInit', Main.initStyle
|
|
||||||
return unless Main.isThisPageLegit()
|
return unless Main.isThisPageLegit()
|
||||||
# disable the mobile layout
|
# disable the mobile layout
|
||||||
$('link[href*=mobile]', d.head)?.disabled = true
|
$('link[href*=mobile]', d.head)?.disabled = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user