Update Next/Previous board page navigation.

This commit is contained in:
Nicolas Stepien 2012-05-02 11:14:43 +02:00
parent 8bbddc262e
commit e6954fd254
2 changed files with 9 additions and 7 deletions

View File

@ -1071,7 +1071,7 @@
return $.on(d, 'keydown', Keybinds.keydown);
},
keydown: function(e) {
var key, o, range, selEnd, selStart, ta, thread, value, _ref, _ref1;
var key, link, o, range, selEnd, selStart, ta, thread, value;
if (!(key = Keybinds.keyCode(e)) || /TEXTAREA|INPUT/.test(e.target.nodeName) && !(e.altKey || e.ctrlKey || e.keyCode === 27)) {
return;
}
@ -1132,13 +1132,13 @@
window.location = "/" + g.BOARD + "/0#0";
break;
case Conf.nextPage:
if ((_ref = $('input[value=Next]')) != null) {
_ref.click();
if (link = $('link[rel=next]', d.head)) {
window.location = link.href;
}
break;
case Conf.previousPage:
if ((_ref1 = $('input[value=Previous]')) != null) {
_ref1.click();
if (link = $('link[rel=prev]', d.head)) {
window.location.href = link.href;
}
break;
case Conf.nextThread:

View File

@ -888,9 +888,11 @@ Keybinds =
when Conf.zero
window.location = "/#{g.BOARD}/0#0"
when Conf.nextPage
$('input[value=Next]')?.click()
if link = $ 'link[rel=next]', d.head
window.location = link.href
when Conf.previousPage
$('input[value=Previous]')?.click()
if link = $ 'link[rel=prev]', d.head
window.location.href = link.href
# Thread Navigation
when Conf.nextThread
return if g.REPLY