diff --git a/map4.js b/map4.js index 07c8186..c8505fd 100644 --- a/map4.js +++ b/map4.js @@ -126,7 +126,7 @@ const li = document.createElement("li"); const diff = (Date.now() - new Date(row.updated_at)) / 1000; - const isOnline = diff < 30; + const isOnline = diff < 6; li.classList.add(isOnline ? "online" : "offline"); @@ -225,9 +225,9 @@ renderSelfMarker(); await saveMyLocation(lastLat, lastLng); } catch {} - }, 8000); + }, 2000); - setInterval(showOtherUsers, 2000); + setInterval(showOtherUsers, 1000); document.getElementById("exitBtn").onclick = () => (location.href = "index.html");