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 {
|
:root.index-loading .pagelist {
|
||||||
display: none;
|
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 {
|
#index-search {
|
||||||
padding-right: 1.5em;
|
padding-right: 1.5em;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
Index =
|
Index =
|
||||||
init: ->
|
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'
|
@db = new DataBoard 'pinnedThreads'
|
||||||
Thread.callbacks.push
|
Thread.callbacks.push
|
||||||
@ -142,6 +146,13 @@ Index =
|
|||||||
val: isPinned: thread.isPinned
|
val: isPinned: thread.isPinned
|
||||||
Index.sort()
|
Index.sort()
|
||||||
Index.buildIndex()
|
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:
|
cb:
|
||||||
rootClass: ->
|
rootClass: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user