mirror of
https://github.com/MrEidam/CubeTime.git
synced 2026-06-28 15:39:25 +00:00
Version 2
This commit is contained in:
19
main.js
Normal file
19
main.js
Normal file
@@ -0,0 +1,19 @@
|
||||
setInterval(() => {
|
||||
let hh;
|
||||
let mm;
|
||||
|
||||
if(new Date().getHours()<=9){
|
||||
hh = '0' + new Date().getHours();
|
||||
}else{
|
||||
hh = new Date().getHours();
|
||||
}
|
||||
|
||||
if(new Date().getMinutes()<=9){
|
||||
mm = '0' + new Date().getMinutes();
|
||||
}else{
|
||||
mm = new Date().getMinutes();
|
||||
}
|
||||
document.querySelectorAll('.side').forEach((e) => {
|
||||
e.innerHTML = `${hh} : ${mm}`;
|
||||
})
|
||||
}, 1000);
|
||||
Reference in New Issue
Block a user