1export default function HeaderModule() { 2 const hd = document.querySelector('.hd'); 3 const menuCateFilter = document.querySelector('.menu-cate-filter'); 4 const commentSticky = document.querySelector('.comment-header-wrap'); 5 const podcastsAudioJS = document.querySelector('.podcastsAudioJS'); 6 7 let lastScroll = 0; 8 window.onscroll = () => { 9 let currentScroll = document.documentElement.scrollTop || document.body.scrollTop; // Get Current Scroll Value 10 11 if (currentScroll > 0 && lastScroll <= currentScroll) { 12 // down 13 lastScroll = currentScroll; 14 hd.classList.add('out') 15 hd.classList.remove('in') 16 17 // if (menuFilter) { 18 // menuFilter.classList.add('out') 19 // menuFilter.classList.remove('in') 20 // } 21 22 if (menuCateFilter) { 23 menuCateFilter.classList.add('out') 24 menuCateFilter.classList.remove('in') 25 } 26 27 if (commentSticky) { 28 commentSticky.classList.remove('in') 29 } 30 31 if (podcastsAudioJS) { 32 podcastsAudioJS.classList.add('bottom') 33 } 34 35 } else { 36 // up 37 lastScroll = currentScroll; 38 hd.classList.remove('out') 39 hd.classList.add('in') 40 41 // if (menuFilter) { 42 // menuFilter.classList.remove('out') 43 // menuFilter.classList.add('in') 44 // } 45 46 if (menuCateFilter) { 47 menuCateFilter.classList.remove('out') 48 menuCateFilter.classList.add('in') 49 } 50 51 if (commentSticky) { 52 commentSticky.classList.add('in') 53 } 54 55 if (podcastsAudioJS) { 56 podcastsAudioJS.classList.remove('bottom') 57 } 58 } 59 } 60}
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.