1// const 2const body = document.body; 3const header = document.querySelector('header'); 4const root = document.documentElement; 5 6let resizeTimer = null; 7 8/** 9 * è¦ç´ ã®å¹ ã»é«ããåå¾ãã¦CSS夿°ã«åæ 10 */ 11function updateWindowVariables() { 12 const windowWidth = window.innerWidth; 13 const scrollbarWidth = window.innerWidth - document.body.clientWidth; 14 const viewHeight = window.innerHeight; 15 const headerHeight = header ? header.offsetHeight : 0; 16 17 root.style.setProperty('--js-windowWidth', `${windowWidth}px`); 18 root.style.setProperty('--js-scrollbarWidth', `${scrollbarWidth}px`); 19 root.style.setProperty('--js-viewHeight', `${viewHeight}px`); 20 root.style.setProperty('--js-headerHeight', `${headerHeight}px`); 21} 22 23/** 24 * åæå®è¡ 25 */ 26updateWindowVariables(); 27 28/** 29 * ãªãµã¤ãºå®äºå¾ã«åè¨ç® 30 */ 31window.addEventListener('resize', function () { 32 clearTimeout(resizeTimer); 33 34 resizeTimer = setTimeout(function () { 35 updateWindowVariables(); 36 }, 200); 37});
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.