remove duplication

This commit is contained in:
l5y
2025-09-15 21:35:59 +02:00
parent 0768b4d91a
commit 7eb36a5a3d

View File

@@ -106,7 +106,7 @@
<h1><%= site_name %></h1>
<div class="row meta">
<div class="meta-info">
<p id="refreshInfo" class="refresh-info" aria-live="polite"><%= default_channel %> (<%= default_frequency %>) — active nodes (hour/day/week): … — auto-refresh every <%= refresh_interval_seconds %> seconds.</p>
<p id="refreshInfo" class="refresh-info" aria-live="polite"><%= default_channel %> (<%= default_frequency %>) — active nodes: … — auto-refresh every <%= refresh_interval_seconds %> seconds.</p>
<div class="refresh-actions">
<button id="refreshBtn" type="button">Refresh now</button>
<span id="status" class="pill">loading…</span>
@@ -173,7 +173,7 @@
const NODE_LIMIT = 1000;
const CHAT_LIMIT = 1000;
const REFRESH_MS = <%= refresh_interval_seconds * 1000 %>;
refreshInfo.textContent = `<%= default_channel %> (<%= default_frequency %>) — active nodes (hour/day/week): … — auto-refresh every ${REFRESH_MS / 1000} seconds.`;
refreshInfo.textContent = `<%= default_channel %> (<%= default_frequency %>) — active nodes: … — auto-refresh every ${REFRESH_MS / 1000} seconds.`;
const MAP_CENTER = L.latLng(<%= map_center_lat %>, <%= map_center_lon %>);
const MAX_NODE_DISTANCE_KM = <%= max_node_distance_km %>;
@@ -517,7 +517,7 @@
const c = nodes.filter(n => n.last_heard && nowSec - Number(n.last_heard) <= w.secs).length;
return `${c}/${w.label}`;
}).join(', ');
refreshInfo.textContent = `<%= default_channel %> (<%= default_frequency %>) — active nodes (hour/day/week): ${counts} — auto-refresh every ${REFRESH_MS / 1000} seconds.`;
refreshInfo.textContent = `<%= default_channel %> (<%= default_frequency %>) — active nodes: ${counts} — auto-refresh every ${REFRESH_MS / 1000} seconds.`;
}
</script>
</body>