HodlEye_Crypto_Price_Tracker/public/js/script.js
Gerald f5f8310b38 Update 1.5.0
- Adding Portfolio Page
- Fixing Alarm Layout with Category
- Automatically delete alarms that have expired
2025-04-04 18:01:01 +02:00

23 lines
535 B
JavaScript

document.querySelectorAll('.modal').forEach(modal => {
modal.addEventListener('click', function(event) {
if (event.target === modal) {
modal.style.display = 'none';
}
});
});
function logout() {
fetch("/logout", {
method: "GET",
credentials: "same-origin"
}).then(response => {
if (response.redirected) {
window.location.href = response.url; // Leitet zur Login-Seite um
}
}).catch(error => console.error("Logout-Fehler:", error));
}