diff --git a/src/main.js b/src/main.js index b99a827..3ab6bb8 100644 --- a/src/main.js +++ b/src/main.js @@ -1128,42 +1128,9 @@ function handleResize(state) { // --- Bootstrap --------------------------------------------------------------- -// --- Mobile Detection -------------------------------------------------------- - -function isMobile() { - // Check both user agent and viewport width for robust detection - const uaMatch = - /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( - navigator.userAgent, - ); - const narrowViewport = window.innerWidth <= 768; - return uaMatch || narrowViewport; -} - -function buildMobileUI() { - const app = document.getElementById("app"); - app.innerHTML = ` -
-
-

NetWatch by @sneak

-

Real-time network latency monitor

-
-
-

Not yet available on mobile.

-

Please visit on a desktop browser for the full experience.

-
-
`; -} - async function init() { log.info("NetWatch starting"); - if (isMobile()) { - log.info("Mobile device detected — showing placeholder"); - buildMobileUI(); - return; - } - // Probe common gateway IPs to find the local router const gateway = await detectGateway(); const localHosts = [LOCAL_CPE];