add j,k bindings to subframes
This commit is contained in:
parent
7b433d8c02
commit
63186cdb78
14
feedlist.js
14
feedlist.js
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
15
viewfeed.js
15
viewfeed.js
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue