summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-04-13 20:15:23 +0300
committerAndrew Dolgov <[email protected]>2023-04-13 20:15:23 +0300
commit0578bf802571781a0a7e3debbbec66437a7d28b4 (patch)
tree45be9364de018c64f6f12897536b751b499344d6
parent1e90feef0e0cd7a2ad18ea9547ccedbe49a26991 (diff)
add Headlines.default_move_on_expand tunable
-rwxr-xr-xjs/Headlines.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index be17bf832..5706377f8 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -13,6 +13,7 @@ const Headlines = {
_scroll_reset_timeout: false,
default_force_previous: false,
default_force_to_top: false,
+ default_move_on_expand: true,
line_scroll_offset: 120, /* px */
sticky_header_observer: new IntersectionObserver(
(entries, observer) => {
@@ -255,7 +256,8 @@ const Headlines = {
// this would only work if there's enough space
App.byId("headlines-frame").scrollTop -= scroll_position_A-scroll_position_B;
- Article.cdmMoveToId(id);
+ if (this.default_move_on_expand)
+ Article.cdmMoveToId(id);
}
} else if (in_body) {