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;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Index */
|
||||||
|
:root.index-loading .board {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Announcement Hiding */
|
/* Announcement Hiding */
|
||||||
:root.hide-announcement #globalMessage,
|
:root.hide-announcement #globalMessage,
|
||||||
:root.hide-announcement-enabled #toggleMsgBtn {
|
:root.hide-announcement-enabled #toggleMsgBtn {
|
||||||
|
|||||||
@ -69,7 +69,7 @@ Main =
|
|||||||
initFeature 'Polyfill', Polyfill
|
initFeature 'Polyfill', Polyfill
|
||||||
initFeature 'Header', Header
|
initFeature 'Header', Header
|
||||||
initFeature 'Settings', Settings
|
initFeature 'Settings', Settings
|
||||||
initFeature 'Index Pager', Index
|
initFeature 'Index Generator', Index
|
||||||
initFeature 'Announcement Hiding', PSAHiding
|
initFeature 'Announcement Hiding', PSAHiding
|
||||||
initFeature 'Fourchan thingies', Fourchan
|
initFeature 'Fourchan thingies', Fourchan
|
||||||
initFeature 'Custom CSS', CustomCSS
|
initFeature 'Custom CSS', CustomCSS
|
||||||
|
|||||||
@ -40,12 +40,12 @@ Index =
|
|||||||
order: 90
|
order: 90
|
||||||
subEntries: [modeEntry, sortEntry]
|
subEntries: [modeEntry, sortEntry]
|
||||||
|
|
||||||
$.on d, '4chanXInitFinished', @initReady
|
$.addClass doc, 'index-loading'
|
||||||
|
Index.root = $.el 'div', className: 'board'
|
||||||
initReady: ->
|
|
||||||
$.off d, '4chanXInitFinished', Index.initReady
|
|
||||||
Index.root = $ '.board'
|
|
||||||
Index.update()
|
Index.update()
|
||||||
|
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->
|
||||||
|
$.replace $('.board'), Index.root
|
||||||
|
$.rmClass doc, 'index-loading'
|
||||||
|
|
||||||
cb:
|
cb:
|
||||||
mode: ->
|
mode: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user