PageSourceSearch

https://www.maine.edu/wp-content/mu-plugins/chickadee/assets/js/back-to-top.js?ver=1786464374

js maine.edu collected 2026-09-24 08:25:41 UTC 1,190 bytes, 34 lines download raw bytes

1// Back to top icon fade in/out w resize
2const minWidth = 1024; // Set the minimum width
3function handleScreenSizeChange() {
4    if (window.innerWidth >= minWidth) {
5        document.addEventListener("DOMContentLoaded", function () {
6            var scrollTopButton = document.querySelector('.back-to-top-button');
7            window.addEventListener('scroll', function () {
8                // Check if user has scrolled 200px or more
9                if (window.scrollY > 200 && window.innerWidth >= minWidth) {
10                    scrollTopButton.style.opacity = '1';
11                } else {
12                    scrollTopButton.style.opacity = '0';
13                }
14            });
15        });
16    }
17}
18
19// Initial check on page load
20handleScreenSizeChange();
21
22// Listen for window resize events
23window.addEventListener('resize', function() {
24    // Get the new screen width
25    const screenWidth = window.innerWidth;
26    // Perform actions based on the new screen width
27    if (screenWidth < minWidth) {
28        var scrollTopButton = document.querySelector('.back-to-top-button');
29        scrollTopButton.style.opacity = '0';
30    }
31    else {
32        handleScreenSizeChange();
33    }
34});

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.