1export const fixedBanner = () => { 2 // ãã¼ã¸èªã¿è¾¼ã¿æã« scrolled ã¯ã©ã¹ãé表示 3 document.querySelector("html").classList.remove("scrolled"); 4 5 let footerVisible = false; // ããã¿ã¼ã表示ããã¦ãããã©ããã®ãã©ã° 6 7 // ã¹ã¯ãã¼ã«ã¤ãã³ãã§300px以ä¸ã¹ã¯ãã¼ã«ãããããç£è¦ 8 const handleScroll = () => { 9 // ããã¿ã¼ã表示ããã¦ããå ´å㯠scrolled ã¯ã©ã¹ãåé¤ããå¦çãã¹ããã 10 if (footerVisible) { 11 document.querySelector("html").classList.remove("scrolled"); 12 return; 13 } 14 15 if (window.scrollY > 300) { 16 document.querySelector("html").classList.add("scrolled"); 17 } else { 18 document.querySelector("html").classList.remove("scrolled"); 19 } 20 }; 21 22 // åæã¹ã¯ãã¼ã«ä½ç½®ããã§ã㯠23 handleScroll(); 24 25 // ã¹ã¯ãã¼ã«æã«ãã§ãã¯ããããã®ãªã¹ãã¼ã追å 26 window.addEventListener('scroll', handleScroll); 27 28 // ããã¿ã¼ã表示ããããscrolledã¯ã©ã¹ãåé¤ 29 const footerObserver = new IntersectionObserver(function(entries) { 30 entries.forEach(entry => { 31 if (entry.isIntersecting) { 32 footerVisible = true; // ããã¿ã¼ã表示ããã¦ãããã¨ã示ããã©ã°ã true ã« 33 document.querySelector("html").classList.remove("scrolled"); 34 } else { 35 footerVisible = false; // ããã¿ã¼ããã¥ã¼ãã¼ãå¤ã«åºãããã©ã°ã false ã« 36 } 37 }); 38 }, { 39 root: null, 40 rootMargin: "0px", 41 threshold: 0.0 42 }); 43 44 // footer ãç£è¦ 45 footerObserver.observe(document.querySelector("footer")); 46};
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.