&ie=1&v=<%=SportsApp.Core.Version %>" /> re.test(pathWithQuery)) } function waitForElement(selector, {timeout=10000, interval=100} = {}) { return new Promise((resolve, reject) => { const t0 = Date.now() const iv = setInterval(() => { const el = document.querySelector(selector) if (el) { clearInterval(iv); resolve(el) } else if (Date.now() - t0 > timeout) { clearInterval(iv); reject() } }, interval) }) } (async function attachDiagnostics() { if (!pathMatchesAllowlist()) return const SELECTOR = 'textarea[name="data[diagnosticInformation]"]' let input try { input = await waitForElement(SELECTOR, {timeout: 15000}) } catch { return } let diag try { diag = await getClientDiagnostics() } catch { diag = { error: "getClientDiagnostics failed" } } const value = JSON.stringify(diag, null, 2) input.value = value const form = input.closest('form') if (form) { form.addEventListener('submit', async () => { try { input.value = JSON.stringify(await getClientDiagnostics(), null, 2) } catch {} }, {capture: true}) } const mo = new MutationObserver(() => { if (!input.value) input.value = value }) mo.observe(input, {attributes: true, attributeFilter: ['value']}) })(); async function getClientDiagnostics() { const safe = (fn, f = null) => { try { return fn(); } catch {...
Continue reading

Hugh Kane/The Williams Record
Messenger Hanover lowers his mark to 1:54 while taking the top trot at Pocono on Monday. Curtis Salonick photo.

