PageSourceSearch

https://www.salisbury.edu/_files/js/home-page-video.js?date=20251129023526

js salisbury.edu collected 2026-09-24 08:40:46 UTC 5,387 bytes, 98 lines download raw bytes

1const vid = document.getElementById("bg-video");
2const play_pause_button = document.getElementById("button-play-pause");
3let navigator_text =  (navigator.appCodeName + navigator.appName + navigator.appVersion + navigator.cookieEnabled + 
4                        navigator.language + navigator.onLine + navigator.platform + navigator.userAgent).toLowerCase();
5let nav_text =  'appCodeName: ' + navigator.appCodeName + '\nappName: ' + navigator.appName + '\nappVersion: ' + navigator.appVersion + 
6'\ncookieEnabled: ' + navigator.cookieEnabled + '\nlanguage: ' + navigator.language + '\nonLine: ' + navigator.onLine + 
7'\nplatform: ' + navigator.platform + '\nuserAgent: ' + navigator.userAgent;
8var isWindows = navigator_text.indexOf('(windows ') + navigator_text.indexOf('win32')
9const is_Tablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(navigator_text);
10const isMobile = ('ontouchstart' in document.documentElement && navigator_text.match(/mobi/));
11//if (isMobile == "mobi" && is_Tablet == false) { 
12    //vid.parentElement.innerHTML = ""; 
13    //play_pause_button.style.display = "none";
14    //document.getElementById("homepage-masthead__content-container").style.backgroundImage = "url('https://0utwqfl7.cdn.imgeng.in/_images/wave/homepage/video-background-image.jpg')"; 
15    //document.getElementById("homepage-masthead__content-container").style.backgroundImage = ""; 
16    //document.getElementById("homepage-masthead__content-container").style.backgroundPositionY = "0"; 
17    //var mobile_img = "mobile-homepage-homecoming.jpg";
18    //mobile_img = "mobile-homepage.jpg";
19    //mobile_img = "mobile-homepage-commencement-spring-2022.jpg";
20    //document.getElementById("video-background").innerHTML="<img alt=\"Holloway Hall with banners that read: Make Tomorrow Yours\" loading=\"lazy\" src=\"https://0utwqfl7.cdn.imgeng.in/_images/wave/homepage/" + mobile_img + "\"/>"; 
21//} else {
22    var vb = document.getElementById("video-background");
23    var vbimg = vb.getElementsByTagName("img");
24    vbimg[0].style.display = "none";
25//}
26vid.addEventListener("playing", () => {
27    play_pause_button.classList.add("playing");
28});
29vid.addEventListener("pause", () => {
30    play_pause_button.classList.remove("playing");
31});
32play_pause_button.addEventListener("click", () => {
33    if (vid.paused) {
34        vid.play();
35        play_pause_button.classList.remove("playing");
36        $('.play-pause-btn-vimeo .icon-video-play-hp').addClass('hideicon');
37        $('.play-pause-btn-vimeo .icon-video-pause-hp').removeClass('hideicon');
38        //$('.play-pause-btn-vimeo').addClass('ri-pause-circle-line');
39        $('.play-pause-btn-vimeo').attr('aria-label', 'Pause background video');
40        $('.play-pause-btn-vimeo').attr('aria-labeledby', 'Pause background video');
41        $('.play-pause-btn-vimeo').attr('aria-describedby', 'Pause background video');
42    } else {
43        vid.pause();
44        play_pause_button.classList.add("playing");
45        $('.play-pause-btn-vimeo .icon-video-pause-hp').addClass('hideicon');
46        $('.play-pause-btn-vimeo .icon-video-play-hp').removeClass('hideicon');
47        //$('.play-pause-btn-vimeo').removeClass('ri-pause-circle-line');
48        //$('.play-pause-btn-vimeo').removeClass('ri-pause-circle-line');
49        //$('.play-pause-btn-vimeo').addClass('ri-play-circle-line');
50        $('.play-pause-btn-vimeo').attr('aria-label', 'Play background video');
51        $('.play-pause-btn-vimeo').attr('aria-labeledby', 'Play background video');
52        $('.play-pause-btn-vimeo').attr('aria-describedby', 'Play background video');
53    }
54});
55play_pause_button.addEventListener("keypress", () => {
56    if (vid.paused) {
57        vid.play();
58        play_pause_button.classList.add("playing");
59        $('.play-pause-btn-vimeo').removeClass('ri-play-circle-line');
60        $('.play-pause-btn-vimeo').addClass('ri-pause-circle-line');
61        $('.play-pause-btn-vimeo').attr('aria-label', 'Pause background video');
62        $('.play-pause-btn-vimeo').attr('aria-labeledby', 'Pause background video');
63        $('.play-pause-btn-vimeo').attr('aria-describedby', 'Pause background video');
64    } else {
65        vid.pause();
66        play_pause_button.classList.remove("playing");
67        $('.play-pause-btn-vimeo').removeClass('ri-pause-circle-line');
68        $('.play-pause-btn-vimeo').addClass('ri-play-circle-line');
69        $('.play-pause-btn-vimeo').attr('aria-label', 'Play background video');
70        $('.play-pause-btn-vimeo').attr('aria-labeledby', 'Play background video');
71        $('.play-pause-btn-vimeo').attr('aria-describedby', 'Play background video');
72
73    }
74});
75document.addEventListener("DOMContentLoaded", () => {
76    if (vid.paused) {
77        play_pause_button.classList.remove("playing");
78
79    } else {
80        play_pause_button.classList.add("playing");
81
82    }
83});
84document.addEventListener("keydown", function(event) {
85    
86    if (event.key === "c" || event.key === "C") {
87        
88        let track = vid.textTracks && vid.textTracks[0]
89        if (track.mode && track.mode == "showing") {
90            if (track) track.mode = "hidden"
91        } else {
92            if (track) track.mode = "showing";
93            track.style.top = '0';
94        }
95    
96    }
97
98});

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.