PageSourceSearch

https://montreal.ua/assets/6725064c/js/scroll-btn.js

js montreal.ua collected 2026-10-08 07:23:49 UTC 1,307 bytes, 36 lines download raw bytes

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

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.