summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-19 19:13:56 +0400
committerAndrew Dolgov <[email protected]>2013-03-19 19:14:28 +0400
commitd2db81a5f67dfc13bab7cf379d1182f7aa794eb1 (patch)
treeb589f3a6e5ec3a1976cfb76c87b8e582d79f47c6
parentd5b82f3ebba0fa76cd6fcc6e552b4cd9f90ef8f0 (diff)
improve hotkey buffer scrolling speed; bind viewport scrolling to shift-arrows
-rw-r--r--include/functions.php2
-rw-r--r--js/tt-rss.js8
-rw-r--r--js/viewfeed.js4
3 files changed, 10 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index d1743af7a..4eff1149e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1946,6 +1946,8 @@
"c n" => "catchup_above",
"*n" => "article_scroll_down",
"*p" => "article_scroll_up",
+ "*(38)|Shift+up" => "article_scroll_up",
+ "*(40)|Shift+down" => "article_scroll_down",
"a *w" => "toggle_widescreen",
"e" => "email_article",
"a q" => "close_article",
diff --git a/js/tt-rss.js b/js/tt-rss.js
index a8552d173..e9bc9d412 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -659,10 +659,14 @@ function hotkey_handler(e) {
catchupRelativeToArticle(0);
return false;
case "article_scroll_down":
- scrollArticle(50);
+ var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
+
+ scrollArticle(ctr.offsetHeight/3);
return false;
case "article_scroll_up":
- scrollArticle(-50);
+ var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
+
+ scrollArticle(-ctr.offsetHeight/3);
return false;
case "close_article":
closeArticlePanel();
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 622a8109f..9a16befff 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -560,11 +560,11 @@ function moveToPost(mode, noscroll) {
var ctr = $("headlines-frame");
if (!noscroll && article && article.offsetTop < ctr.scrollTop) {
- scrollArticle(-ctr.offsetHeight/2);
+ scrollArticle(-ctr.offsetHeight/3);
} else if (!noscroll && prev_article &&
prev_article.offsetTop < ctr.scrollTop) {
cdmExpandArticle(prev_id);
- scrollArticle(-ctr.offsetHeight/2);
+ scrollArticle(-ctr.offsetHeight/3);
} else if (prev_id) {
cdmExpandArticle(prev_id);
cdmScrollToArticleId(prev_id, noscroll);