X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=data%2Fweb-static%2Fjs%2Fmudsync.js;fp=data%2Fweb-static%2Fjs%2Fmudsync.js;h=0e7ebe6f1c94abc23f64b582c8f87ea0c06436c3;hp=cf340d5d6b1343ff597584d242b7ecfec47d0ee7;hb=0974cafbe7e10dd08fe3fef371d002c3606feb9e;hpb=8561a7ac3f146fc19b62153ba94a90a80d61d5d2 diff --git a/data/web-static/js/mudsync.js b/data/web-static/js/mudsync.js index cf340d5..0e7ebe6 100644 --- a/data/web-static/js/mudsync.js +++ b/data/web-static/js/mudsync.js @@ -26,8 +26,9 @@ function scrollDown() { function withMaybeScroll(thunk) { var stream_metabox = document.getElementById("stream-metabox"); var should_scroll = false; - if(stream_metabox.scrollTop === (stream_metabox.scrollHeight - - stream_metabox.offsetHeight)) { + // if within a reasonable threshold, we scroll + if((stream_metabox.scrollHeight - stream_metabox.offsetHeight) + - stream_metabox.scrollTop <= 50) { should_scroll = true; } thunk();