diff --git a/css/style.css b/css/style.css index 5abad3b16..9fe79e071 100644 --- a/css/style.css +++ b/css/style.css @@ -378,6 +378,11 @@ a[href="javascript:;"] { :root.index-loading .pagelist { display: none; } +:root.removing-catalog-links .navLinks { + /* can't `display:none;` the text node next to the link, + so we hide the container instead. */ + visibility: hidden; +} #index-search { padding-right: 1.5em; width: 100px; diff --git a/src/General/Index.coffee b/src/General/Index.coffee index df3545264..0f3ff07f5 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -1,6 +1,10 @@ Index = init: -> - return if g.VIEW isnt 'index' or g.BOARD.ID is 'f' + if g.VIEW isnt 'index' + @rmCatalogLinks() + return + return if g.BOARD.ID is 'f' + @db = new DataBoard 'pinnedThreads' Thread.callbacks.push @@ -142,6 +146,13 @@ Index = val: isPinned: thread.isPinned Index.sort() Index.buildIndex() + rmCatalogLinks: -> + $.addClass doc, 'removing-catalog-links' + $.ready -> + for el in $$ '.navLinks a[href$=catalog]' + $.rm el.previousSibling + $.rm el + $.rmClass doc, 'removing-catalog-links' cb: rootClass: ->