]> git.wh0rd.org Git - tt-rss.git/commitdiff
add j,k bindings to subframes
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 28 Nov 2005 06:50:47 +0000 (07:50 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 28 Nov 2005 06:50:47 +0000 (07:50 +0100)
feedlist.js
viewfeed.js

index 499705b634bca4560c0e618f88362be10179002c..a974afdb279e7e7d78abfbec8a6d4efe768da758 100644 (file)
@@ -118,6 +118,20 @@ function localHotkeyHandler(keycode) {
                return parent.scheduleFeedUpdate(true);
        }
 
+       var feedlist = document.getElementById('feedList');
+
+       if (keycode == 74) { // j
+               var feed = getActiveFeedId();
+               var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
+               if (new_feed) viewfeed(new_feed, 0, '');
+       }
+
+       if (keycode == 75) { // k
+               var feed = getActiveFeedId();
+               var new_feed = getRelativeFeedId(feedlist, feed, 'next');
+               if (new_feed) viewfeed(new_feed, 0, '');
+       }
+
 //     alert("KC: " + keycode);
 
 }
index 7f33824021cb531bb4eafcee76fc6965ed4fe175..4aa7f4f5e0cc4ef254bb9ab172dc9fdf0b7b2a76 100644 (file)
@@ -204,6 +204,21 @@ function localHotkeyHandler(keycode) {
                return parent.scheduleFeedUpdate(true);
        }
 
+       var f_doc = parent.frames["feeds-frame"].document;
+       var feedlist = f_doc.getElementById('feedList');
+
+       if (keycode == 74) { // j
+               var feed = getActiveFeedId();
+               var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
+               if (new_feed) viewfeed(new_feed, 0, '');
+       }
+
+       if (keycode == 75) { // k
+               var feed = getActiveFeedId();
+               var new_feed = getRelativeFeedId(feedlist, feed, 'next');
+               if (new_feed) viewfeed(new_feed, 0, '');
+       }
+
 // FIXME
 //     if (keycode == 85) {
 //             return viewfeed(active_feed_id, active_offset, "ForceUpdate");