&ie=1&v=<%=SportsApp.Core.Version %>" /> { 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 = ‘input[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’]}) })(); ]]]]]]]]>]]]]]]>]]]]>]]> null) : null); // UA-CH (modern user-agent hints) const uaData =…
Continue reading
