1document.addEventListener('DOMContentLoaded', function () { 2 /** 3 * 追尾ã¦ã£ã¸ã§ãã 4 * - ãããã¼ã追尾ãã¦ãããã©ããã§ä»ä¸ããå¤ã夿´ãã 5 */ 6 const trackingElement = document.getElementById('sideBarTracking'); 7 const headerElement = document.getElementById('commonHeader'); 8 let attrTopvalue = ''; 9 if (!headerElement) return; 10 if(trackingElement){ 11 if(headerElement.classList.contains('d--header-tracking-on') && headerElement.classList.contains('d--header-layout1')){ 12 const headerHeight = headerElement.clientHeight; 13 attrTopvalue = headerHeight + 15; 14 trackingElement.style.top = attrTopvalue + 'px'; 15 } else { 16 trackingElement.style.top = 15 + 'px'; 17 } 18 } 19 /** 20 * ãããã¼è¿½å¾ 21 * ã¹ã¯ãã¼ã«ã§ãµãã£ã¨è¡¨ç¤ºããã 22 */ 23 24 let ticking = false; 25 const scrollElement = document.querySelector('#commonHeader'); 26 const scrollElementParts = document.querySelector('.a--header-style-parts'); 27 28 if (!ticking) { 29 if(!scrollElement) return; 30 if(scrollElement.classList.contains('d--header-tracking-on') && scrollElement.classList.contains('d--header-layout1')){ 31 function JinrHeaderScrollAnimation() { 32 requestAnimationFrame(function () { 33 ticking = false; 34 if (window.pageYOffset > 1050) { 35 scrollElement.classList.remove("js--follow-header-display-off"); 36 scrollElement.classList.add("js--follow-header-display"); 37 } else if (scrollElement.classList.contains("js--follow-header-display")) { 38 scrollElement.classList.remove("js--follow-header-display"); 39 scrollElement.classList.add("js--follow-header-display-off"); 40 } else if (window.pageYOffset < 300) { 41 scrollElement.classList.remove("js--follow-header-display-off"); 42 } 43 }); 44 ticking = true; 45 } 46 document.addEventListener('scroll', JinrHeaderScrollAnimation, { passive: true }); 47 } 48 if(!scrollElementParts) return; 49 if(scrollElementParts.classList.contains('d--header-tracking-on') && scrollElement.classList.contains('d--header-layout1')){ 50 51 function JinrHeaderScrollAnimation() { 52 requestAnimationFrame(function () { 53 ticking = false; 54 if (window.pageYOffset > 1050) { 55 scrollElementParts.classList.remove("js--follow-header-display-off"); 56 scrollElementParts.classList.add("js--follow-header-display"); 57 } else if (scrollElementParts.classList.contains("js--follow-header-display")) { 58 scrollElementParts.classList.remove("js--follow-header-display"); 59 scrollElementParts.classList.add("js--follow-header-display-off"); 60 } else if (window.pageYOffset < 300) { 61 scrollElementParts.classList.remove("js--follow-header-display-off"); 62 } 63 }); 64 ticking = true; 65 } 66 document.addEventListener('scroll', JinrHeaderScrollAnimation, { passive: true }); 67 } 68 } 69});
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.