PageSourceSearch

https://www.msdconnect.jp/wp-content/plugins/cex-wpvip-mhh-back-to…/js/mhh-back-to-top-frontend.js?ver=1.0.0

js msdconnect.jp collected 2026-09-25 18:39:53 UTC 1,412 bytes, 41 lines download raw bytes

1console.log("Frontend JS has been connected!");
2
3window.addEventListener("load", () => {
4    const button = document.getElementById("mhh-back-to-top");
5
6    const rootElement = document.documentElement;
7
8    function handleScroll() {
9        let scrollTotal = rootElement.scrollHeight - rootElement.clientHeight;
10        if ((rootElement.scrollTop / scrollTotal ) > 0.05 ) {
11            // Show button
12            button.classList.remove('hide');
13        } else {
14            // Hide button
15            button.classList.add('hide');
16        }
17    }
18
19    document.addEventListener('scroll', handleScroll);
20
21    // Scroll to top function
22    button.addEventListener("click", () => {
23        const element = document.getElementsByTagName("body")[0];
24
25        element.scrollIntoView({ behavior: "smooth", block: "start" });
26    });
27
28    // Icon only (no text)
29    if (button.childNodes[1].lastElementChild.classList.value !== 'text-container') {
30        button.childNodes[1].lastElementChild.classList.add('no-text');
31        button.childNodes[1].classList.add('no-text');
32    }
33
34    // Remove set width if using custom text
35    if (button.childNodes[1].lastElementChild.classList.value === 'text-container' ) {
36        const buttonText = document.querySelector('#button-text');
37        if (buttonText.innerHTML !== 'Back to Top') {
38            button.childNodes[1].classList.add('custom-text');
39        }
40    }
41});

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.