(function($){$(function(){
- t = $('#global-progress').data('t');
+ let t = $('#global-progress').data('t');
+
function upd_t() {
$text = $('#main-text #book-text');
texttop = $text.offset().top;
textlen = textbottom - texttop;
progress = (window.scrollY - texttop) / textlen;
progress = Math.max(0, Math.min(progress, 1))
- console.log('SCROLL BODY', progress);
$('#global-progress .filled').css('right', (1 - progress) * 100 + '%');
tleft = Math.round((1 - progress) * t / 60);