aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/widgets/clock
diff options
context:
space:
mode:
authorGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
committerGitea <gitea@fake.local>2021-11-10 17:53:13 +0100
commit7b4af63a90a726b98a59b83e53f040a7a566a11d (patch)
treeb85747947816fe4375e85ab6b822ffabec548c7b /Neutron-trunk/widgets/clock
parent80f78c2925530e945503ab603e79d1acc53075f4 (diff)
downloadelectrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.gz
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.bz2
electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.zip
Update
Diffstat (limited to 'Neutron-trunk/widgets/clock')
-rw-r--r--[-rwxr-xr-x]Neutron-trunk/widgets/clock/feature.json0
-rw-r--r--[-rwxr-xr-x]Neutron-trunk/widgets/clock/source.php10
2 files changed, 7 insertions, 3 deletions
diff --git a/Neutron-trunk/widgets/clock/feature.json b/Neutron-trunk/widgets/clock/feature.json
index 70db617..70db617 100755..100644
--- a/Neutron-trunk/widgets/clock/feature.json
+++ b/Neutron-trunk/widgets/clock/feature.json
diff --git a/Neutron-trunk/widgets/clock/source.php b/Neutron-trunk/widgets/clock/source.php
index 04c3939..68218e2 100755..100644
--- a/Neutron-trunk/widgets/clock/source.php
+++ b/Neutron-trunk/widgets/clock/source.php
@@ -1,5 +1,5 @@
<div id="widget-space">
- <div style="text-align: center;"><h3 id="widget-clock-time">00:00:00</h3><span id="widget-clock-date">????? ??? ??????? ????</span></div>
+ <div style="text-align: center;"><h3 class="widget-clock-time">00:00:00</h3><span class="widget-clock-date">????? ??? ??????? ????</span></div>
</div>
<script>
@@ -89,8 +89,12 @@ setInterval(() => {
if (month == 12) {
month_str = "<?= $lang["widgets"]["clock"]["months"][11] ?>"
}
- document.getElementById('widget-clock-time').innerHTML = hours_str + ":" + minutes_str + ":" + seconds_str
- document.getElementById('widget-clock-date').innerHTML = dow_str + " " + day_str + " " + month_str + " " + year
+ Array.from(document.getElementsByClassName('widget-clock-time')).forEach((e) => {
+ e.innerHTML = hours_str + ":" + minutes_str + ":" + seconds_str
+ })
+ Array.from(document.getElementsByClassName('widget-clock-date')).forEach((e) => {
+ e.innerHTML = dow_str + " " + day_str + " " + month_str + " " + year
+ })
}, 100)
</script> \ No newline at end of file