summaryrefslogtreecommitdiff
path: root/js/tt-rss.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r--js/tt-rss.js40
1 files changed, 26 insertions, 14 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 0e970205c..595766f4e 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -285,10 +285,16 @@ require(["dojo/_base/kernel",
if (rv) Feeds.open({feed: rv[0], is_cat: rv[1], delayed: true})
};
this.hotkey_actions["next_article_or_scroll"] = function (event) {
- Headlines.move('next', {event: event});
+ if (App.isCombinedMode())
+ Headlines.scroll(Headlines.line_scroll_offset, event);
+ else
+ Headlines.move('next', {event: event});
};
this.hotkey_actions["prev_article_or_scroll"] = function (event) {
- Headlines.move('prev', {event: event});
+ if (App.isCombinedMode())
+ Headlines.scroll(-Headlines.line_scroll_offset, event);
+ else
+ Headlines.move('prev', {event: event});
};
this.hotkey_actions["next_article_noscroll"] = function (event) {
Headlines.move('next', {noscroll: true, event: event});
@@ -335,28 +341,34 @@ require(["dojo/_base/kernel",
Headlines.catchupRelativeTo(0);
};
this.hotkey_actions["article_scroll_down"] = function (event) {
- const ctr = App.isCombinedMode() ? $("headlines-frame") : $("content-insert");
-
- if (ctr)
- Article.scroll(ctr.offsetHeight / 2, event);
+ if (App.isCombinedMode())
+ Headlines.scroll(Headlines.line_scroll_offset, event);
+ else
+ Article.scroll(Headlines.line_scroll_offset, event);
};
this.hotkey_actions["article_scroll_up"] = function (event) {
- const ctr = App.isCombinedMode() ? $("headlines-frame") : $("content-insert");
-
- if (ctr)
- Article.scroll(-ctr.offsetHeight / 2, event);
+ if (App.isCombinedMode())
+ Headlines.scroll(-Headlines.line_scroll_offset, event);
+ else
+ Article.scroll(-Headlines.line_scroll_offset, event);
};
- this.hotkey_actions["next_article_page"] = function (event) {
+ this.hotkey_actions["next_headlines_page"] = function (event) {
Headlines.scrollByPages(1, event);
};
- this.hotkey_actions["prev_article_page"] = function (event) {
+ this.hotkey_actions["prev_headlines_page"] = function (event) {
Headlines.scrollByPages(-1, event);
};
this.hotkey_actions["article_page_down"] = function (event) {
- Article.scrollByPages(1, event);
+ if (App.isCombinedMode())
+ Headlines.scrollByPages(1, event);
+ else
+ Article.scrollByPages(1, event);
};
this.hotkey_actions["article_page_up"] = function (event) {
- Article.scrollByPages(-1, event);
+ if (App.isCombinedMode())
+ Headlines.scrollByPages(-1, event);
+ else
+ Article.scrollByPages(-1, event);
};
this.hotkey_actions["close_article"] = function () {
if (App.isCombinedMode()) {