Load the index asap on page load.
This commit is contained in:
parent
29b96a4a07
commit
5b6c1df083
@ -362,6 +362,11 @@ a[href="javascript:;"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Index */
|
||||
:root.index-loading .board {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Announcement Hiding */
|
||||
:root.hide-announcement #globalMessage,
|
||||
:root.hide-announcement-enabled #toggleMsgBtn {
|
||||
|
||||
@ -69,7 +69,7 @@ Main =
|
||||
initFeature 'Polyfill', Polyfill
|
||||
initFeature 'Header', Header
|
||||
initFeature 'Settings', Settings
|
||||
initFeature 'Index Pager', Index
|
||||
initFeature 'Index Generator', Index
|
||||
initFeature 'Announcement Hiding', PSAHiding
|
||||
initFeature 'Fourchan thingies', Fourchan
|
||||
initFeature 'Custom CSS', CustomCSS
|
||||
|
||||
@ -40,12 +40,12 @@ Index =
|
||||
order: 90
|
||||
subEntries: [modeEntry, sortEntry]
|
||||
|
||||
$.on d, '4chanXInitFinished', @initReady
|
||||
|
||||
initReady: ->
|
||||
$.off d, '4chanXInitFinished', Index.initReady
|
||||
Index.root = $ '.board'
|
||||
$.addClass doc, 'index-loading'
|
||||
Index.root = $.el 'div', className: 'board'
|
||||
Index.update()
|
||||
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->
|
||||
$.replace $('.board'), Index.root
|
||||
$.rmClass doc, 'index-loading'
|
||||
|
||||
cb:
|
||||
mode: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user