diff options
author | Andrew Dolgov <[email protected]> | 2019-12-04 15:50:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-12-04 15:50:49 +0300 |
commit | 6913158b8291c70cdab79641e771e2e89e11ac3e (patch) | |
tree | 095bd74f19ac83ecd335bf7f23fb608e2ac6d257 /js/Article.js | |
parent | cb92f56b13bcdd48a2db5de8acd26d90819dcc0b (diff) |
add hotkeys to scroll headlines/articles (whichever is active) by one page
Diffstat (limited to 'js/Article.js')
-rw-r--r-- | js/Article.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/Article.js b/js/Article.js index 970234818..e40e1fca0 100644 --- a/js/Article.js +++ b/js/Article.js @@ -314,6 +314,20 @@ define(["dojo/_base/declare"], function (declare) { else return 0; }, + scrollPages: function (offset) { + if (!App.isCombinedMode()) { + const ci = $("content-insert"); + if (ci) { + ci.scrollTop += ci.offsetHeight * offset * 0.9; + } + } else { + const hi = $("headlines-frame"); + if (hi) { + hi.scrollTop += hi.offsetHeight * offset * 0.9; + } + + } + }, scroll: function (offset) { if (!App.isCombinedMode()) { const ci = $("content-insert"); |