Add catalog switcher button in the inline catalog.

This commit is contained in:
Mayhem 2014-01-29 17:51:19 +01:00
parent b05fa8159f
commit 81b2c8eef2
2 changed files with 10 additions and 0 deletions

View File

@ -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 ->

View File

@ -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]