mirror of
https://github.com/NohamR/xovi-qmd-extensions.git
synced 2025-11-23 10:59:30 +00:00
67 lines
3.1 KiB
Plaintext
67 lines
3.1 KiB
Plaintext
; credit for the original clock implementation: https://github.com/StarNumber12046/xovi-qmd-extensions/blob/main/clock.qmd
|
|
AFFECT [[4911547370760691430]]
|
|
TRAVERSE [[3819512207256720568]] > [[14125623155555875541]]#[[15885405667098360701]]
|
|
LOCATE BEFORE [[16385778650434842232]]#[[7709552963638993992]]
|
|
INSERT {
|
|
~&16385778650434842232&~ {
|
|
~&5972374&~: clockSidebarItem
|
|
~&8399878573055752961&~: "clockSidebarObject"
|
|
~&214642559243&~: ~&5971598&~.~&6460516198169535423&~(getCestTime(), set_Format_Date)
|
|
~&8399601734642709923&~: ~&"4628214070783643584&~
|
|
~&7082453764421&~: ~&214625660372&~
|
|
~&233726547792244&~: ~&6504329801&~
|
|
|
|
/* 1000 = 1 second / 60000 = 1 minute */
|
|
property ~&197088788&~ set_Timer: 60000
|
|
property ~&7083178290016&~ set_Format_Date: "dd/MM hh:mm"
|
|
|
|
function getCestTime() {
|
|
~&197102514&~ now = new ~&6502586279&~();
|
|
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
|
|
~&197102514&~ cestTime = new ~&6502586279&~(utc + (1 * 3600000)); /* UTC + 1 hours
|
|
*/
|
|
~&7083121450889&~ cestTime;
|
|
}
|
|
|
|
~&254480451320573660&~.~&495334332051582499&~: {
|
|
~&214642559243&~ = ~&5971598&~.~&6460516198169535423&~(getCestTime(), set_Format_Date);
|
|
}
|
|
|
|
~&254542236275632405&~: {
|
|
|
|
~&5972376&~ (clockSidebarItem.set_Timer === 60000) {
|
|
clockSidebarItem.set_Timer = 1000;
|
|
clockSidebarItem.set_Format_Date = "dd/MM hh:mm:ss";
|
|
} ~&6503784146&~ {
|
|
clockSidebarItem.set_Timer = 60000;
|
|
clockSidebarItem.set_Format_Date = "dd/MM hh:mm";
|
|
}
|
|
|
|
~&214642551402&~.~&7713147298280334&~ = clockSidebarItem.set_Timer
|
|
clockSidebarItem.~&214642559243&~ = ~&5971598&~.~&6460516198169535423&~(clockSidebarItem.getCestTime(), clockSidebarItem.set_Format_Date);
|
|
}
|
|
|
|
/* Timer for update time */
|
|
~&214604601930&~ {
|
|
~&5972374&~: ~&214642551402&~
|
|
~&7713147298280334&~: clockSidebarItem.set_Timer
|
|
~&7083121289162&~: ~&6504329801&~
|
|
~&233743626668842&~: ~&6504329801&~
|
|
|
|
~&495358363329399331&~: {
|
|
clockSidebarItem.~&214642559243&~ = ~&5971598&~.~&6460516198169535423&~(clockSidebarItem.getCestTime(), clockSidebarItem.set_Format_Date);
|
|
}
|
|
}
|
|
|
|
~&7081629735527&~.~&17520348323745447649&~: ~&7082020628281&~.~&15061686673205541622&~
|
|
~&7081629735527&~.~&7797818826744279624&~: ~&7083038346995&~.~&214646099849&~
|
|
~&11921478716705041271&~: ~&233744436321411&~
|
|
|
|
function ~&7712792149454042&~() {
|
|
~&7083211098251&~();
|
|
}
|
|
}
|
|
}
|
|
END TRAVERSE
|
|
END AFFECT
|