移除顶部时间

This commit is contained in:
CN-JS-HuiBai
2026-04-04 20:34:56 +08:00
parent 0715ae6ef0
commit 86039abea5
2 changed files with 5 additions and 7 deletions

View File

@@ -70,7 +70,7 @@
</div>
</div>
<div class="header-right">
<div class="clock" id="clock"></div>
<div class="theme-switch-wrapper">
<label class="theme-switch" for="themeToggle">
<input type="checkbox" id="themeToggle" />

View File

@@ -10,7 +10,7 @@
// ---- DOM Elements ----
const dom = {
clock: document.getElementById('clock'),
clock: document.getElementById('clock'), // May be null if removed from UI
serverCountText: document.getElementById('serverCountText'),
sourceCount: document.getElementById('sourceCount'),
totalServers: document.getElementById('totalServers'),
@@ -77,10 +77,6 @@
// Add SVG gradient definitions for gauges
addGaugeSvgDefs();
// Clock
updateClock();
setInterval(updateClock, 1000);
// Resource Gauges Time
updateGaugesTime();
setInterval(updateGaugesTime, 1000);
@@ -296,7 +292,9 @@
// ---- Clock ----
function updateClock() {
dom.clock.textContent = formatClock();
if (dom.clock) {
dom.clock.textContent = formatClock();
}
}
function updateGaugesTime() {