mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-22 10:42:27 +02:00
23 lines
573 B
JavaScript
23 lines
573 B
JavaScript
$(document).ready(() => {
|
|
'use strict';
|
|
|
|
/**
|
|
* Render the current EVE time in the top menu bar
|
|
* @param element
|
|
*/
|
|
const renderClock = (element) => {
|
|
const datetimeNow = new Date();
|
|
const h = String(datetimeNow.getUTCHours()).padStart(2, '0');
|
|
const m = String(datetimeNow.getUTCMinutes()).padStart(2, '0');
|
|
|
|
element.html(`${h}:${m}`);
|
|
};
|
|
|
|
/**
|
|
* Start the EVE time clock in the top menu bar
|
|
*/
|
|
setInterval(() => {
|
|
renderClock($('.eve-time-wrapper .eve-time-clock'));
|
|
}, 500);
|
|
});
|