Debug: add update counter
This commit is contained in:
1 parent
9d13b1386b
commit
355201b174
1 file changed
+4
-7
+4
-7
@@ -327,7 +327,7 @@
|
|||||||
<div class="info-icon">
|
<div class="info-icon">
|
||||||
<svg id="moon-phase-icon" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" fill="#1c1b1f"/></svg>
|
<svg id="moon-phase-icon" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" fill="#1c1b1f"/></svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-content"><span class="info-label">Mondphase</span><span class="info-value" id="moon-phase-text">--</span><span id="dbg-test" style="color:red"></span></div>
|
<div class="info-content"><span class="info-label">Mondphase</span><span class="info-value" id="moon-phase-text">--</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<div class="info-icon">
|
<div class="info-icon">
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<div class="info-icon">
|
<div class="info-icon">
|
||||||
<svg viewBox="0 0 24 24" fill="#b0a89a"><path d="M12 2 a10 10 0 1 0 0 20 a8 8 0 1 1 0 -16 a6 6 0 1 1 0 8"/></svg>
|
<svg viewBox="0 0 24 24" fill="#b0a89a"><circle cx="12" cy="12" r="4"/><line x1="12" y1="12" x2="12" y2="3" stroke="#b0a89a" stroke-width="2"/></svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-content"><span class="info-label">Zenit Mond</span><span><span class="info-value" id="moon-zenith-value">--:--</span><span class="info-sub" id="moon-zenith-when"></span></span></div>
|
<div class="info-content"><span class="info-label">Zenit Mond</span><span><span class="info-value" id="moon-zenith-value">--:--</span><span class="info-sub" id="moon-zenith-when"></span></span></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -772,6 +772,7 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
|
|||||||
|
|
||||||
function updateClockAndEvents() {
|
function updateClockAndEvents() {
|
||||||
try {
|
try {
|
||||||
|
window._updateCounter = (window._updateCounter || 0) + 1;
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
|
|
||||||
// Real-time clock hands and digital
|
// Real-time clock hands and digital
|
||||||
@@ -898,7 +899,7 @@ if (moonTimes.set) {
|
|||||||
// Moon phase
|
// Moon phase
|
||||||
var moonIllum = SunCalc.getMoonIllumination(now);
|
var moonIllum = SunCalc.getMoonIllumination(now);
|
||||||
document.getElementById('moon-phase-text').textContent =
|
document.getElementById('moon-phase-text').textContent =
|
||||||
getMoonPhaseText(moonIllum.phase) + ' ' + Math.round(moonIllum.fraction * 100) + '%';
|
getMoonPhaseText(moonIllum.phase) + ' ' + Math.round(moonIllum.fraction * 100) + '%' + ' #' + window._updateCounter;
|
||||||
renderMoonPhaseIcon(moonIllum.phase, moonIllum.fraction);
|
renderMoonPhaseIcon(moonIllum.phase, moonIllum.fraction);
|
||||||
renderRpgMoon(moonIllum.phase, moonIllum.fraction);
|
renderRpgMoon(moonIllum.phase, moonIllum.fraction);
|
||||||
|
|
||||||
@@ -913,10 +914,6 @@ if (moonTimes.set) {
|
|||||||
var moonZenithWhen = moonZenith && moonZenith > now ? formatDateLong(moonZenith) : '';
|
var moonZenithWhen = moonZenith && moonZenith > now ? formatDateLong(moonZenith) : '';
|
||||||
document.getElementById('moon-zenith-value').textContent = moonZenith ? formatTimeHM(moonZenith) : '--:--';
|
document.getElementById('moon-zenith-value').textContent = moonZenith ? formatTimeHM(moonZenith) : '--:--';
|
||||||
document.getElementById('moon-zenith-when').textContent = moonZenithWhen ? '· ' + moonZenithWhen : '';
|
document.getElementById('moon-zenith-when').textContent = moonZenithWhen ? '· ' + moonZenithWhen : '';
|
||||||
var dbgEl = document.getElementById('dbg-test');
|
|
||||||
if (dbgEl) {
|
|
||||||
dbgEl.textContent = 'moon-zenith: ' + (moonZenith ? formatTimeHM(moonZenith) : 'none') + ' visible: ' + moonVisible;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('updateClock error:', e);
|
console.log('updateClock error:', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user