aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/widgets/clock
diff options
context:
space:
mode:
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