restore non-JSON navigation keybinds

This commit is contained in:
ccd0 2014-04-12 04:03:27 -07:00
parent 2064baa227
commit 1ee5c11968

View File

@ -70,7 +70,7 @@ Keybinds =
when 'thread'
ThreadUpdater.update()
when 'index'
Index.update()
if Conf['JSON Navigation'] then Index.update()
when Conf['Watch']
ThreadWatcher.toggle thread
# Images
@ -86,20 +86,33 @@ Keybinds =
FappeTyme.cb.toggle.call {name: 'werk'}
# Board Navigation
when Conf['Front page']
if g.VIEW is 'index'
if Conf['JSON Navigation'] and g.VIEW is 'index'
Index.userPageNav 0
else
window.location = "/#{g.BOARD}/"
when Conf['Open front page']
$.open "/#{g.BOARD}/"
when Conf['Next page']
return unless g.VIEW is 'index' and Conf['Index Mode'] isnt 'all pages'
$('.next button', Index.pagelist).click()
return unless g.VIEW is 'index'
if Conf['JSON Navigation']
if Conf['Index Mode'] isnt 'all pages'
$('.next button', Index.pagelist).click()
else
if form = $ '.next form'
window.location = form.action
when Conf['Previous page']
return unless g.VIEW is 'index' and Conf['Index Mode'] isnt 'all pages'
$('.prev button', Index.pagelist).click()
return unless g.VIEW is 'index'
if Conf['JSON Navigation']
if Conf['Index Mode'] isnt 'all pages'
$('.prev button', Index.pagelist).click()
else
if form = $ '.prev form'
window.location = form.action
when Conf['Search form']
Index.searchInput.focus()
if Conf['JSON Navigation']
Index.searchInput.focus()
else
$.id('search-btn').click()
when Conf['Open catalog']
if Conf['External Catalog']
window.location = CatalogLinks.external(g.BOARD.ID)