PageSourceSearch

https://www.eurekausd.org/scripts/main-app-download.js

js eurekausd.org collected 2026-10-01 15:27:53 UTC 1,722 bytes, 57 lines download raw bytes

1//20-12-30
2// Removes empty app links
3let appBarEmptyLinks = $(".app-bar-buttons a[href|='']");
4$(appBarEmptyLinks).remove();
5
6//Variable for App Bar Div with the H1 and P elements
7let appBarText = document.querySelector('.app-bar-text');
8//console.log(appBarText.getBoundingClientRect());
9
10//Reference for checking number of scans - Starts number of scans at 1 in function below
11//let  numberOfScans = 1;
12
13//Grabs measurements and position values of where the element's rectangle sits in the viewport
14function isVisible(element) {
15	let elementBox = element.getBoundingClientRect();
16	let distanceFromTop = -125;
17	
18	if(elementBox.top - window.innerHeight < distanceFromTop) {
19		return true;
20	}
21	else {
22		return false;
23	};
24}
25
26//Scans the document and adds scrolledOn class to trigger animation, removes it when scrolled outside viewport
27function scanDocument() {
28	let sectionList = document.querySelectorAll('.app-bar-text');
29	sectionList.forEach(function(section) {
30		if(isVisible(section)){
31			section.classList.add('scrolled-on');
32		}
33		else {
34			section.classList.remove('scrolled-on');
35		};
36	});
37	//Reference for checking number of scans - Logs scans in the console
38	//console.log(numberOfScans);
39	//numberOfScans++
40}
41
42
43//Reference for checking number of scans - Original unthrottled scan function
44//document.addEventListener("scroll", scanDocument);
45
46//Throttles scan function to 10 per second of scrolling (100 out of 1000 milliseconds)
47function throttle(fn, wait) {
48	let time = Date.now();
49	return function () {
50		if ((time + wait - Date.now()) < 0) {
51			fn();
52			time = Date.now();
53		}
54	}
55}
56
57document.addEventListener("scroll", throttle(scanDocument, 100));

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.