1//Scroll back to top 2 3(function($) { "use strict"; 4 5 $(document).ready(function(){"use strict"; 6 7 var progressPath = document.querySelector('.progress-wrap path'); 8 var pathLength = progressPath.getTotalLength(); 9 progressPath.style.transition = progressPath.style.WebkitTransition = 'none'; 10 progressPath.style.strokeDasharray = pathLength + ' ' + pathLength; 11 progressPath.style.strokeDashoffset = pathLength; 12 progressPath.getBoundingClientRect(); 13 progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; 14 var updateProgress = function () { 15 var scroll = $(window).scrollTop(); 16 var height = $(document).height() - $(window).height(); 17 var progress = pathLength - (scroll * pathLength / height); 18 progressPath.style.strokeDashoffset = progress; 19 } 20 updateProgress(); 21 $(window).scroll(updateProgress); 22 var offset = 50; 23 var duration = 550; 24 jQuery(window).on('scroll', function() { 25 if (jQuery(this).scrollTop() > offset) { 26 jQuery('.progress-wrap').addClass('active-progress'); 27 } else { 28 jQuery('.progress-wrap').removeClass('active-progress'); 29 } 30 }); 31 jQuery('.progress-wrap').on('click', function(event) { 32 event.preventDefault(); 33 jQuery('html, body').animate({scrollTop: 0}, duration); 34 return false; 35 }) 36 37 38 }); 39 40})(jQuery);
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.