add page moving shortcuts

This commit is contained in:
Andrew Dolgov 2007-01-19 10:54:17 +01:00
parent 203de776e0
commit 50a2595d40
2 changed files with 25 additions and 5 deletions

View file

@ -17,13 +17,21 @@ function feedlist_callback() {
var page_offset = 0; var page_offset = 0;
function viewFeedGoPage(i) { function viewFeedGoPage(i) {
try {
if (!getActiveFeedId()) return;
if (i != 0) {
page_offset = page_offset + i; page_offset = page_offset + i;
} else {
page_offset = 0;
}
if (page_offset < 0) page_offset = 0; if (page_offset < 0) page_offset = 0;
viewfeed(getActiveFeedId(), undefined, undefined, undefined, viewfeed(getActiveFeedId(), undefined, undefined, undefined,
undefined, page_offset); undefined, page_offset);
} catch (e) {
exception_error(e, "viewFeedGoPage");
}
} }
function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {

View file

@ -237,6 +237,18 @@ function hotkey_handler(e) {
debug_mode_enabled = !debug_mode_enabled; debug_mode_enabled = !debug_mode_enabled;
} }
if (keycode == 190 && shift_key) { // >
viewFeedGoPage(1);
}
if (keycode == 188 && shift_key) { // <
viewFeedGoPage(-1);
}
if (keycode == 191 && shift_key) { // ?
viewFeedGoPage(0);
}
if (keycode == 69 && shift_key) { if (keycode == 69 && shift_key) {
return editFeedDlg(getActiveFeedId()); return editFeedDlg(getActiveFeedId());
} }