···6161 callback(!document.hidden);
6262 });
6363}
6464+6565+// Re-localize every `[data-iso]` play-time element from its build-time UTC
6666+// rendering into the visitor's local timezone. The element already shows
6767+// correct UTC text; we only swap the text content to local HH:MM.
6868+export function localize_dates() {
6969+ var els = document.querySelectorAll("[data-iso]");
7070+ for (var i = 0; i < els.length; i++) {
7171+ var el = els[i];
7272+ var iso = el.getAttribute("data-iso");
7373+ if (!iso) continue;
7474+ try {
7575+ var d = new Date(iso);
7676+ if (isNaN(d.getTime())) continue;
7777+ var h = d.getHours();
7878+ var m = d.getMinutes();
7979+ el.textContent = (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m;
8080+ } catch (_) {
8181+ // Keep the build-time UTC text on any failure.
8282+ }
8383+ }
8484+}