mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-15 06:26:54 +00:00
Fixed the calendar
This commit is contained in:
+8
-4
@@ -235,8 +235,10 @@
|
||||
xhr.setRequestHeader('userId', window.sessionStorage.getItem('Id'));
|
||||
|
||||
xhr.onloadend = (e) => {
|
||||
//Maybe have an alert for logged in?
|
||||
//No need
|
||||
window.localStorage.removeItem("Id");
|
||||
window.localStorage.setItem('sessionId', xhr.response);
|
||||
|
||||
document.getElementById('alertrow').style = "";
|
||||
window.location.href = "index.html";
|
||||
|
||||
@@ -272,14 +274,16 @@
|
||||
}
|
||||
|
||||
function logout() {
|
||||
window.localStorage.clear();
|
||||
window.sessionStorage.clear();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
|
||||
|
||||
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
|
||||
xhr.onloadend = (e) => {
|
||||
window.localStorage.clear();
|
||||
window.sessionStorage.clear();
|
||||
window.location.href = 'index.html';
|
||||
}
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user