1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
letu/public/javascripts/main.js

26 lines
419 B
JavaScript
Raw Normal View History

2020-11-03 12:54:40 +01:00
let socket = io.connect();
/*
Front-end Event
*/
// Disconnect
document.getElementById("logout").addEventListener("click", function() {
socket.emit("logout")
});
/*
Socket Actions
*/
// Disconnect
socket.on("logout", data=>{
if(data.error){
alert(data.error.message);
}else{
window.location.href = "/";
}
2020-11-23 21:28:17 +01:00
})
function profilRedirect(){
document.location.href="/profil";
}