diff --git a/css/style.css b/css/style.css index a67c82043..544b955a0 100644 --- a/css/style.css +++ b/css/style.css @@ -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 { diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 885b09231..0528e4f08 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -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 diff --git a/src/Miscellaneous/Index.coffee b/src/Miscellaneous/Index.coffee index edb9e17d9..ed9a8cd56 100644 --- a/src/Miscellaneous/Index.coffee +++ b/src/Miscellaneous/Index.coffee @@ -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: ->