From 6913158b8291c70cdab79641e771e2e89e11ac3e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Dec 2019 15:50:49 +0300 Subject: add hotkeys to scroll headlines/articles (whichever is active) by one page --- js/Article.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'js/Article.js') 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"); -- cgit v1.2.3-54-g00ecf