Remove [Catalog] links in threads.
This commit is contained in:
parent
1aa467b051
commit
b05fa8159f
@ -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;
|
||||
|
||||
@ -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: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user