1// Scroll back to top 2 var progressPath = document.querySelector('.progress-wrap path'); 3 var pathLength = progressPath.getTotalLength(); 4 progressPath.style.transition = progressPath.style.WebkitTransition = 'none'; 5 progressPath.style.strokeDasharray = pathLength + ' ' + pathLength; 6 progressPath.style.strokeDashoffset = pathLength; 7 progressPath.getBoundingClientRect(); 8 progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; 9 var updateProgress = function () { 10 var scroll = jQuery(window).scrollTop(); 11 var height = jQuery(document).height() - jQuery(window).height(); 12 var progress = pathLength - (scroll * pathLength / height); 13 progressPath.style.strokeDashoffset = progress; 14 } 15 updateProgress(); 16 jQuery(window).scroll(updateProgress); 17 var offset = 150; 18 var duration = 550; 19 jQuery(window).on('scroll', function () { 20 if (jQuery(this).scrollTop() > offset) { 21 jQuery('.progress-wrap').addClass('active-progress'); 22 } else { 23 jQuery('.progress-wrap').removeClass('active-progress'); 24 } 25 }); 26 jQuery('.progress-wrap').on('click', function (event) { 27 event.preventDefault(); 28 jQuery('html, body').animate({ 29 scrollTop: 0 30 }, duration); 31 return false; 32 })
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.