Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 700c7f8

Browse files
committed
Fix dead clock on mod_clock
1 parent de2a757 commit 700c7f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/assets/css/mod_clock.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
div#mod_clock {
22
display: flex;
33
height: 80px;
4+
padding-top: 7px;
45
border-bottom: 1px solid rgba(190, 230, 193, 0.3);
56
}
67

src/classes/clock.class.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ class Clock {
55
// Create DOM
66
this.parent = document.getElementById(parentId);
77
this.parent.innerHTML += `<div id="mod_clock">
8-
<h1><span>?</span><span>?</span><span>:</span><span>?</span><span>?</span><span>:</span><span>?</span><span>?</span></h1>
8+
<h1 id="mod_clock_text"><span>?</span><span>?</span><span>:</span><span>?</span><span>?</span><span>:</span><span>?</span><span>?</span></h1>
99
</div>`;
1010

11-
this.clockText = document.querySelector("#mod_clock > h1");
1211
this.updateClock();
1312
this.updater = setInterval(() => {
1413
this.updateClock();
@@ -29,7 +28,7 @@ class Clock {
2928
if (e === ":") clockString += "<em>"+e+"</em>";
3029
else clockString += "<span>"+e+"</span>";
3130
});
32-
this.clockText.innerHTML = clockString;
31+
document.getElementById("mod_clock_text").innerHTML = clockString;
3332
}
3433
}
3534

0 commit comments

Comments
 (0)