Merge branch 'front' into add-friends-list

This commit is contained in:
Adam
2025-10-20 13:46:08 +02:00
committed by GitHub
4 changed files with 69 additions and 81 deletions

View File

@ -75,8 +75,6 @@ window.addEventListener("popstate", router);
document.addEventListener("DOMContentLoaded", () => {
isLogged();
document.body.addEventListener("click", e => {
if (!e.target.closest("#taskbar-menu") && !e.target.matches("#profile-button")) {
profile_view.open = false;
@ -121,9 +119,18 @@ function updateClock()
clock.innerHTML = `${days[now.getDay()]} ${now.getDate()} ${months[now.getMonth()]} ` + hours + ":" + minutes;
}
friends_view.run();
async function pingClock() {
if (await isLogged()) {
fetch(`http://localhost:3002/ping`, {
method: "POST",
credentials: "include"
});
}
}
setInterval(updateClock, 5000);
updateClock();
setInterval(pingClock, 30000);
oneko();