1/** 2 * ãããã¼ã®é«ããåå¾ãã¦ã«ã¹ã¿ã ããããã£ã«ã»ãããã 3 * @returns {void} 4 */ 5export function calculateHeaderHeight() { 6 /** 7 * ãããã¼ã®ã»ã¬ã¯ã¿ 8 * @type {string} 9 */ 10 const headerSelectorString = '#header'; 11 12 /** 13 * ãã£ãã«ã¼ã®ã»ã¬ã¯ã¿ 14 * @type {string} 15 */ 16 const tickerSelectorString = '.js-newsticker-head'; 17 18 /** 19 * CSS夿°ã®ããããã£å 20 */ 21 const headerProperty = '--header-full-height'; 22 const tickerProperty = '--ticker-full-height'; 23 24 /** 25 * DOMåå¾ 26 */ 27 const headerElement = document.querySelector(headerSelectorString); 28 const tickerElement = document.querySelector(tickerSelectorString); 29 30 /** 31 * é«ãåå¾ã¨CSS夿°ã®è¨å® 32 */ 33 if (headerElement) { 34 const headerHeight = headerElement.clientHeight; 35 document.documentElement.style.setProperty(headerProperty, `${headerHeight}px`); 36 } 37 38 if (tickerElement) { 39 const tickerHeight = tickerElement.clientHeight; 40 document.documentElement.style.setProperty(tickerProperty, `${tickerHeight}px`); 41 } 42}
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.