1const select = (el, all = false) => { 2 el = el.trim() 3 if (all) { 4 return [...document.querySelectorAll(el)] 5 } else { 6 return document.querySelector(el) 7 } 8} 9 10const onscroll = (el, listener) => { 11 el.addEventListener('scroll', listener) 12} 13 14let backtotop = select('.toTop') 15if (backtotop) { 16 const toggleBacktotop = () => { 17 if (window.scrollY > 100) { 18 backtotop.classList.add('active-toTop') 19 } else { 20 backtotop.classList.remove('active-toTop') 21 } 22 } 23 window.addEventListener('load', toggleBacktotop) 24 onscroll(document, toggleBacktotop) 25}
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.