diff --git a/css/style.css b/css/style.css index 544b955a0..8e57b3adc 100644 --- a/css/style.css +++ b/css/style.css @@ -363,7 +363,8 @@ a[href="javascript:;"] { } /* Index */ -:root.index-loading .board { +:root.index-loading .board, +:root.index-hide-pagelist .pagelist { display: none; } diff --git a/lib/$.coffee b/lib/$.coffee index 711159e6c..53ede1802 100644 --- a/lib/$.coffee +++ b/lib/$.coffee @@ -45,7 +45,7 @@ $.ajax = do -> type or= form and 'post' or 'get' r.open type, url, !sync if whenModified - r.setRequestHeader 'If-Modified-Since', lastModified[url] or '0' + r.setRequestHeader 'If-Modified-Since', lastModified[url] if url of lastModified $.on r, 'load', -> lastModified[url] = r.getResponseHeader 'Last-Modified' $.extend r, options $.extend r.upload, upCallbacks diff --git a/src/Miscellaneous/Index.coffee b/src/Miscellaneous/Index.coffee index 75b8bbdd1..986feb182 100644 --- a/src/Miscellaneous/Index.coffee +++ b/src/Miscellaneous/Index.coffee @@ -44,6 +44,7 @@ Index = subEntries: [modeEntry, sortEntry] $.addClass doc, 'index-loading' + Index.togglePagelist() Index.root = $.el 'div', className: 'board' Index.update() $.asap (-> $('.board', doc) or d.readyState isnt 'loading'), -> @@ -52,11 +53,15 @@ Index = cb: mode: -> + Index.togglePagelist() Index.buildIndex() sort: -> Index.sort() Index.buildIndex() + togglePagelist: -> + (if Conf['Index Mode'] is 'paged' then $.rmClass else $.addClass) doc, 'index-hide-pagelist' + update: -> return unless navigator.onLine Index.req?.abort() @@ -170,4 +175,3 @@ Index = $.event 'IndexRefresh' $.rmAll Index.root $.add Index.root, nodes - $('.pagelist').hidden = Conf['Index Mode'] isnt 'paged'