Add keybind for catalog

This commit is contained in:
Jordan Bates 2013-04-23 08:09:47 -07:00
parent b5318ae864
commit 07848a0b7b
5 changed files with 33 additions and 0 deletions

View File

@ -189,6 +189,7 @@
'Open front page': ['Shift+0', 'Open page 0 in a new tab.'],
'Next page': ['Right', 'Jump to the next page.'],
'Previous page': ['Left', 'Jump to the previous page.'],
'Open catalog': ['Shift+c', 'Open the catalog of the current board'],
'Next thread': ['Down', 'See next thread.'],
'Previous thread': ['Up', 'See previous thread.'],
'Expand thread': ['Ctrl+e', 'Expand thread.'],
@ -5069,6 +5070,13 @@
window.location = form.action;
}
break;
case Conf['Open catalog']:
if (Conf['External Catalog']) {
window.location = CatalogLinks.external(g.BOARD.ID);
} else {
window.location = "/" + g.BOARD + "/catalog";
}
break;
case Conf['Next thread']:
if (g.VIEW === 'thread') {
return;

View File

@ -190,6 +190,7 @@
'Open front page': ['Shift+0', 'Open page 0 in a new tab.'],
'Next page': ['Right', 'Jump to the next page.'],
'Previous page': ['Left', 'Jump to the previous page.'],
'Open catalog': ['Shift+c', 'Open the catalog of the current board'],
'Next thread': ['Down', 'See next thread.'],
'Previous thread': ['Up', 'See previous thread.'],
'Expand thread': ['Ctrl+e', 'Expand thread.'],
@ -5060,6 +5061,13 @@
window.location = form.action;
}
break;
case Conf['Open catalog']:
if (Conf['External Catalog']) {
window.location = CatalogLinks.external(g.BOARD.ID);
} else {
window.location = "/" + g.BOARD + "/catalog";
}
break;
case Conf['Next thread']:
if (g.VIEW === 'thread') {
return;

View File

@ -146,6 +146,7 @@
'Open front page': ['Shift+0', 'Open page 0 in a new tab.'],
'Next page': ['Right', 'Jump to the next page.'],
'Previous page': ['Left', 'Jump to the previous page.'],
'Open catalog': ['Shift+c', 'Open the catalog of the current board'],
'Next thread': ['Down', 'See next thread.'],
'Previous thread': ['Up', 'See previous thread.'],
'Expand thread': ['Ctrl+e', 'Expand thread.'],
@ -4983,6 +4984,13 @@
window.location = form.action;
}
break;
case Conf['Open catalog']:
if (Conf['External Catalog']) {
window.location = CatalogLinks.external(g.BOARD.ID);
} else {
window.location = "/" + g.BOARD + "/catalog";
}
break;
case Conf['Next thread']:
if (g.VIEW === 'thread') {
return;

View File

@ -489,6 +489,10 @@ http://iqdb.org/?url=%TURL
'Left'
'Jump to the previous page.'
]
'Open catalog': [
'Shift+c'
'Open the catalog of the current board'
]
# Thread Navigation
'Next thread': [
'Down'

View File

@ -77,6 +77,11 @@ Keybinds =
when Conf['Previous page']
if form = $ '.prev form'
window.location = form.action
when Conf['Open catalog']
if Conf['External Catalog']
window.location = CatalogLinks.external(g.BOARD.ID)
else
window.location = "/#{g.BOARD}/catalog"
# Thread Navigation
when Conf['Next thread']
return if g.VIEW is 'thread'