summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-09-09 08:08:47 +0100
committerAndrew Dolgov <[email protected]>2008-09-09 08:08:47 +0100
commita411875be5c37256c27d27adee7588a8acbc7104 (patch)
tree034e06eb986eb5fcf8e1fe152aae437673142805 /viewfeed.js
parent45c8c7a68f3504107c23972dac048968eae051db (diff)
set N/P hotkeys to scroll active article (or headlines pane in CDM)
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/viewfeed.js b/viewfeed.js
index 5813f4135..4b90f1d05 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -1903,3 +1903,22 @@ function zoomToArticle(id) {
exception_error("zoomToArticle", e);
}
}
+
+function scrollArticle(offset) {
+ try {
+ if (!isCdmMode()) {
+ var ci = document.getElementById("content-insert");
+ if (ci) {
+ ci.scrollTop += offset;
+ }
+ } else {
+ var hi = document.getElementById("headlinesInnerContainer");
+ if (hi) {
+ hi.scrollTop += offset;
+ }
+
+ }
+ } catch (e) {
+ exception_error("scrollArticle", e);
+ }
+}