1// Re-render the footer's build timestamp in the visitor's own timezone 2// and locale. The server emits the build mtime as an ISO-8601 UTC string 3// in `data-build`; we replace the text node (preserving the trailing 4// .site-footer-ip span) with a localized datetime. 5(function () { 6 function format(iso) { 7 try { 8 const d = new Date(iso); 9 if (isNaN(d.getTime())) return null; 10 // Browser locale + timezone â Intl picks both up automatically. 11 return d.toLocaleString(undefined, { 12 year: 'numeric', month: '2-digit', day: '2-digit', 13 hour: '2-digit', minute: '2-digit', 14 }); 15 } catch { return null; } 16 } 17 18 function apply() { 19 document.querySelectorAll('.site-footer-build[data-build]').forEach((el) => { 20 const iso = el.getAttribute('data-build'); 21 const local = format(iso); 22 if (!local) return; 23 // Replace the leading text node only â keep the .site-footer-ip 24 // span untouched so its custom styling survives. 25 const first = el.firstChild; 26 if (first && first.nodeType === Node.TEXT_NODE) { 27 first.nodeValue = local + ' '; 28 } else { 29 // No leading text node (unexpected) â prepend one. 30 el.insertBefore(document.createTextNode(local + ' '), el.firstChild); 31 } 32 // Hover tooltip shows the original UTC for unambiguous reference. 33 const tz = Intl.DateTimeFormat().resolvedOptions().timeZone || 'local'; 34 el.title = 'Build: ' + iso + ' (UTC) · shown in ' + tz + ' · server IP'; 35 }); 36 } 37 38 if (document.readyState === 'loading') { 39 document.addEventListener('DOMContentLoaded', apply); 40 } else { 41 apply(); 42 } 43 // Re-apply after Blazor enhanced navigation swaps the DOM. 44 document.addEventListener('enhancedload', apply); 45})();
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.