From 279ef6d807608aa835c2bda0107de397b1d20653 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 5 Nov 2024 01:57:55 +0100 Subject: [PATCH] Fix client info --- assets/index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/assets/index.js b/assets/index.js index 4643474..9273c11 100644 --- a/assets/index.js +++ b/assets/index.js @@ -78,7 +78,6 @@ function updateClientInfo() { } locationElement.classList.add("loading"); - fetch(window.location.href) .then((response) => { const clientInfo = response.headers.get("X-Client-Info"); @@ -86,20 +85,9 @@ function updateClientInfo() { throw new Error("X-Client-Info header not present"); } - // Clean up the time value and convert units const cleanClientInfo = clientInfo - // Replace UTF-8 encoded microsecond symbols .replace(/\u00C2\u00B5s/g, "µs") .replace(/µs/g, "µs") - // Convert microseconds to picoseconds for display - .replace(/(\d+\.?\d*)\s*µs/g, (match, number) => { - const picoseconds = parseFloat(number) * 1000000; - return `${picoseconds.toLocaleString(undefined, { - maximumFractionDigits: 2, - })} ps`; - }) - // Remove any other non-ASCII characters - .replace(/[\u0080-\u00FF]/g, "") .trim(); requestAnimationFrame(() => {