Add catalog switcher button in the inline catalog.
This commit is contained in:
parent
b05fa8159f
commit
81b2c8eef2
@ -146,6 +146,15 @@ Index =
|
||||
val: isPinned: thread.isPinned
|
||||
Index.sort()
|
||||
Index.buildIndex()
|
||||
addCatalogSwitch: ->
|
||||
a = $.el 'a',
|
||||
href: 'javascript:;'
|
||||
textContent: 'Switch to <%= meta.name %>\'s catalog'
|
||||
className: 'btn-wrap'
|
||||
$.on a, 'click', ->
|
||||
$.set 'Index Mode', 'catalog'
|
||||
window.location = './'
|
||||
$.add $.id('info'), a
|
||||
rmCatalogLinks: ->
|
||||
$.addClass doc, 'removing-catalog-links'
|
||||
$.ready ->
|
||||
|
||||
@ -12,6 +12,7 @@ Main =
|
||||
else
|
||||
'index'
|
||||
if g.VIEW is 'catalog'
|
||||
$.ready Index.addCatalogSwitch
|
||||
return
|
||||
if g.VIEW is 'thread'
|
||||
g.THREADID = +pathname[3]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user