1/** 2 * Keep --wsft-offer-banner-offset in sync with the real header offer height 3 * so scroll-padding and sticky sidebars clear the stacked mobile banner. 4 */ 5(function () { 6 'use strict'; 7 8 var banner = document.querySelector('.wsft-offer-banner-header'); 9 if (!banner) { 10 return; 11 } 12 13 var root = document.documentElement; 14 15 function sync() { 16 var height = Math.ceil(banner.getBoundingClientRect().height); 17 root.style.setProperty('--wsft-offer-banner-offset', height + 'px'); 18 } 19 20 sync(); 21 22 if (typeof ResizeObserver !== 'undefined') { 23 var observer = new ResizeObserver(sync); 24 observer.observe(banner); 25 return; 26 } 27 28 window.addEventListener('resize', sync); 29})();
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.