]> git.wh0rd.org - tt-rss.git/commitdiff
improve hotkey buffer scrolling speed; bind viewport scrolling to shift-arrows
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 19 Mar 2013 15:13:56 +0000 (19:13 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 19 Mar 2013 15:14:28 +0000 (19:14 +0400)
include/functions.php
js/tt-rss.js
js/viewfeed.js

index d1743af7a09ac13ac655531a0942df232cecdae7..4eff1149e7b2a77f1a815d87feaad39eed43210a 100644 (file)
                                "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",
index a8552d17373e57b0cccfda5ae53951a86c002985..e9bc9d412d615213036a03bf1af762b753f01b8b 100644 (file)
@@ -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();
index 622a8109ffb50e313b04ab7e5d681f69c65133d1..9a16befff2a836dd7e3e87664022c77d4d22853b 100644 (file)
@@ -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);