]> git.wh0rd.org Git - tt-rss.git/commitdiff
add page moving shortcuts
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 Jan 2007 09:54:17 +0000 (10:54 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 Jan 2007 09:54:17 +0000 (10:54 +0100)
feedlist.js
functions.js

index 9b47ce4901679273bffd5b4209bc54c41b0c90a9..286d972eceba538595ddda99db64fcb700a6e00b 100644 (file)
@@ -17,13 +17,21 @@ function feedlist_callback() {
 var page_offset = 0;
 
 function viewFeedGoPage(i) {
-       page_offset = page_offset + i;
-
-       if (page_offset < 0) page_offset = 0;
+       try {
+               if (!getActiveFeedId()) return;
 
-       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) {
index b5cf29b266b3eb7a8f426ae3c8f4112ce408909e..26f3f4bfb1e972255913626d5d80e429b26e3cb1 100644 (file)
@@ -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());
                }