From 50a2595d406a9756cccc8aa652f97fb0760cde92 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Jan 2007 10:54:17 +0100 Subject: [PATCH] add page moving shortcuts --- feedlist.js | 18 +++++++++++++----- functions.js | 12 ++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/feedlist.js b/feedlist.js index 9b47ce49..286d972e 100644 --- a/feedlist.js +++ b/feedlist.js @@ -17,13 +17,21 @@ function feedlist_callback() { var page_offset = 0; function viewFeedGoPage(i) { - page_offset = page_offset + i; + try { + if (!getActiveFeedId()) return; - if (page_offset < 0) page_offset = 0; - - viewfeed(getActiveFeedId(), undefined, undefined, undefined, - undefined, page_offset); + if (i != 0) { + page_offset = page_offset + i; + } else { + page_offset = 0; + } + if (page_offset < 0) page_offset = 0; + viewfeed(getActiveFeedId(), undefined, undefined, undefined, + undefined, page_offset); + } catch (e) { + exception_error(e, "viewFeedGoPage"); + } } function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { diff --git a/functions.js b/functions.js index b5cf29b2..26f3f4bf 100644 --- a/functions.js +++ b/functions.js @@ -237,6 +237,18 @@ function hotkey_handler(e) { 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) { return editFeedDlg(getActiveFeedId()); }