1/* Dynamic header clearance for the two pages that hand-roll their own <header> 2 * (index.html, fb-direct.html) and therefore do not load bcm-header.js, which 3 * carries this logic for every other page. 4 * 5 * The header is position:fixed, so the page reserves room for it with body 6 * padding-top. A STATIC value cannot be right: the header's height changes with 7 * viewport width (the nav wraps onto a second and third row), with the logo size, 8 * and with whether the alerts button is present. index.html had a hardcoded 9 * 185px, and once the logo was aligned to the shared header's 60px (2026-10-02) 10 * the header grew past it and the hero content was clipped behind it. 11 * 12 * Mirrors _syncHeaderClearance() in bcm-header.js, including its two hard-won 13 * details: do NOT add pageYOffset (a fixed header's getBoundingClientRect is 14 * already viewport-relative, and adding scroll made the padding grow on every 15 * scroll on mobile, where the address bar toggling fires resize), and clamp 16 * absurd measurements so a transient 0-height never gets applied. 17 */ 18(function () { 19 function sync() { 20 try { 21 var header = document.querySelector('header'); 22 if (!header) return; 23 if (getComputedStyle(header).position !== 'fixed') return; 24 var pad = Math.ceil(header.getBoundingClientRect().bottom + 12); 25 if (pad < 60 || pad > 400) return; 26 var current = parseInt(document.body.style.paddingTop, 10) || 0; 27 if (pad !== current) { 28 document.body.style.setProperty('padding-top', pad + 'px', 'important'); 29 } 30 } catch (e) {} 31 } 32 if (document.readyState === 'complete') sync(); 33 else window.addEventListener('load', sync); 34 setTimeout(sync, 200); 35 setTimeout(sync, 800); 36 var t; 37 window.addEventListener('resize', function () { clearTimeout(t); t = setTimeout(sync, 150); }); 38})();
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.