This commit is contained in:
parent
47aa4e9893
commit
7a63da4cfc
@ -68,6 +68,21 @@ function eraselabel(label) {
|
|||||||
label.setAttribute("data-animation-interval", eraseInterval);
|
label.setAttribute("data-animation-interval", eraseInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we get the client info from the headers
|
||||||
|
// unclean but it works
|
||||||
|
function updateClientInfo() {
|
||||||
|
fetch(window.location.href)
|
||||||
|
.then((response) => {
|
||||||
|
const clientInfo = response.headers.get("X-Client-Info");
|
||||||
|
if (clientInfo) {
|
||||||
|
document.querySelector(".location").textContent = clientInfo;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error("Error fetching X-Client-Info:", error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// updates the time display
|
// updates the time display
|
||||||
// probably updates too much but eh
|
// probably updates too much but eh
|
||||||
function updateTime() {
|
function updateTime() {
|
||||||
@ -291,6 +306,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
updateStatus();
|
updateStatus();
|
||||||
setInterval(updateStatus, STATUS_UPDATE_INTERVAL);
|
setInterval(updateStatus, STATUS_UPDATE_INTERVAL);
|
||||||
|
|
||||||
|
updateClientInfo();
|
||||||
|
|
||||||
const activeNavIcon = document.querySelector(".nav-icon.active");
|
const activeNavIcon = document.querySelector(".nav-icon.active");
|
||||||
if (activeNavIcon) {
|
if (activeNavIcon) {
|
||||||
const label = activeNavIcon.querySelector(".nav-label");
|
const label = activeNavIcon.querySelector(".nav-label");
|
||||||
|
Loading…
Reference in New Issue
Block a user