1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:35:57 +00:00

- update descriptions of changed hotkeys

- bind noscroll variants of move article hotkeys to n/p by default
- update N/P (i.e. scroll article content) hotkeys to scroll by fraction of viewport height instead of hardcoded pixel distance
- minor fixes w/ checking for undefined
This commit is contained in:
Andrew Dolgov
2019-12-11 06:53:32 +03:00
parent 985e11b754
commit 0a10832491
3 changed files with 24 additions and 30 deletions

View File

@@ -329,13 +329,7 @@ define(["dojo/_base/declare"], function (declare) {
return 0;
},
scrollByPages: function (page_offset, event) {
let elem;
if (!App.isCombinedMode()) {
elem = $("content-insert");
} else {
elem = $("headlines-frame");
}
const elem = App.isCombinedMode() ? $("headlines-frame") : $("content-insert");
const offset = elem.offsetHeight * page_offset * 0.99;
@@ -343,13 +337,7 @@ define(["dojo/_base/declare"], function (declare) {
},
scroll: function (offset, event) {
let elem;
if (!App.isCombinedMode()) {
elem = $("content-insert");
} else {
elem = $("headlines-frame");
}
const elem = App.isCombinedMode() ? $("headlines-frame") : $("content-insert");
if (event && event.repeat) {
elem.addClassName("forbid-smooth-scroll");