summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-16 06:40:03 +0100
committerAndrew Dolgov <[email protected]>2005-11-16 06:40:03 +0100
commitb623b3edcb79ab73febbfac17e6dddc76745bea1 (patch)
treed27eab6ea65e12e1a336b508080bdc8fb35bfcee /viewfeed.js
parentcce41088c0ced4665367f0f25a9c0fff11c9c985 (diff)
some new hotkeys
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/viewfeed.js b/viewfeed.js
index 73ef4c973..459434839 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -177,14 +177,28 @@ function viewfeed(id) {
function localHotkeyHandler(keycode) {
- if (keycode == 78) {
+ if (keycode == 78) { // n
return moveToPost('next');
}
- if (keycode == 80) {
+ if (keycode == 80) { // p
return moveToPost('prev');
}
+ if (keycode == 65) { // a
+ return parent.toggleDispRead();
+ }
+
+ if (keycode == 85) { // u
+ if (parent.getActiveFeedId()) {
+ return parent.viewfeed(parent.getActiveFeedId(), 0, "ForceUpdate");
+ }
+ }
+
+ if (keycode == 82) { // r
+ return parent.scheduleFeedUpdate(true);
+ }
+
// FIXME
// if (keycode == 85) {
// return viewfeed(active_feed_id, active_offset, "ForceUpdate");
@@ -193,3 +207,7 @@ function localHotkeyHandler(keycode) {
// alert("KC: " + keycode);
}
+
+function init() {
+ document.onkeydown = hotkey_handler;
+}