PageSourceSearch

https://hsu.edu/site/assets/scripts/main.js?v=1.1

js hsu.edu collected 2026-10-01 12:08:54 UTC 3,055 bytes, 85 lines download raw bytes

1function makeSwiper(className, config){
2    let defaultConfig = {
3        slidesPerView: 'auto',
4        spaceBetween: 0,
5        loop: true,
6        speed: 600,
7        navigation: {
8            nextEl: '.swiper-button-next',
9            prevEl: '.swiper-button-prev',
10        },
11        pagination: {
12            el: '.swiper-pagination',
13            clickable: true,
14        },
15    }
16    config = Object.assign(defaultConfig, config);
17    return new Swiper(className, config);
18}
19let playButtons = document.getElementsByClassName('play-button');
20const pbOptions = {
21    root: null, // The viewport is the default root
22    rootMargin: '0px',
23    threshold: 0.0
24};
25
26function autoplayVideo(id) {
27    let videoElement = document.getElementById(id);
28    if (videoElement.playing) {
29        // video is already playing so do nothing
30    } else {
31        // video is not playing
32        // so play video now
33        videoElement.play();
34    }
35}
36
37const handleIntersection = (entries, observer) => {
38    entries.forEach(entry => {
39        if (!entry.isIntersecting) {
40            entry.target.pause();
41        }
42    });
43};
44
45const handlePlayButtonClick = (e) => {
46    let playButton = e.target;
47    let video = playButton.dataset['videoTarget'] ? document.getElementById(playButton.dataset['videoTarget']) : null;
48    let youtubeId = playButton.dataset['youtubeId'] ? playButton.dataset['youtubeId'] : null;
49    let poster = playButton.dataset['posterTarget'] ? document.getElementById(playButton.dataset['posterTarget']) : null;
50    let dotnav = playButton.dataset['dotnavTarget'] ? document.getElementById(playButton.dataset['dotnavTarget']) : null;
51    try {
52        if (youtubeId && video) {
53            var ratio = playButton.dataset['ratio'] ? playButton.dataset['ratio'] : '16:9';
54            video.innerHTML = '<iframe src="https://www.youtube-nocookie.com/embed/' + youtubeId + '?autoplay=1&rel=0" style="aspect-ratio: ' + ratio + '" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>';
55        } else if (video) {
56            const observer = new IntersectionObserver(handleIntersection, pbOptions);
57            observer.observe(video);
58            video.controls = true;
59            video.play();
60        }
61        if(playButton) playButton.remove();
62        if(poster) poster.remove();
63        console.log(dotnav)
64        if(dotnav){
65            dotnav.style.opacity = '0';
66        }
67    }catch(e) {
68        console.log(e);
69    }
70}
71
72function setupPlayButtons(){
73    for (let i = 0; i < playButtons.length; i++) {
74        let playButton = playButtons[i];
75        playButton.onclick = handlePlayButtonClick;
76    }
77}
78
79setupPlayButtons();
80function openReadMore(id) {
81    const truncated = document.getElementById('truncated' + id);
82    const fullContent = document.getElementById('fullContent' + id);
83    truncated.classList.toggle('uk-hidden');
84    fullContent.classList.toggle('uk-hidden');
85}

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.