X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6dd6758582da7f138885dc1eee41c8f9031da410..eebe542f3d49cdce6d851587ddf8bd2cb1bd8ef1:/src/wolnelektury/static/js/book_text/progress.js diff --git a/src/wolnelektury/static/js/book_text/progress.js b/src/wolnelektury/static/js/book_text/progress.js index d57a32fbd..723e03ec9 100644 --- a/src/wolnelektury/static/js/book_text/progress.js +++ b/src/wolnelektury/static/js/book_text/progress.js @@ -1,8 +1,11 @@ (function($){$(function(){ - t = $('#global-progress').data('t'); + let t = $('#global-progress').data('t'); + function upd_t() { $text = $('#main-text #book-text'); + if (!$text.length) return; + texttop = $text.offset().top; $footnotes = $('#footnotes', $text);