diff --git a/logout.js b/logout.js index 0134881..133acd6 100644 --- a/logout.js +++ b/logout.js @@ -1,6 +1,6 @@ -// //VARIBLES -myStorage = window.localStorage; -allCookies = document.cookie; +// // //VARIBLES +// myStorage = window.localStorage; +// allCookies = document.cookie; //LOGOUT FETCH FUNCTION @@ -20,13 +20,13 @@ async function logout() { loggedIn() } -// IF THERE IS A TOKEN BUT NO USERNAME LOGOUT -if (allCookies !== '' && myStorage.length === 0) { - logout() -} +// // IF THERE IS A TOKEN BUT NO USERNAME LOGOUT +// if (allCookies !== '' && myStorage.length === 0) { +// logout() +// } -// IF THERE IS NO COOKIE BUT A USERNAME GET RID OF USERNAME LOCALLY. -if (allCookies === '' && myStorage.length !== 0) { - localStorage.removeItem('username') - document.querySelector("#loggeduser").innerHTML = 'You are not logged in' -} \ No newline at end of file +// // IF THERE IS NO COOKIE BUT A USERNAME GET RID OF USERNAME LOCALLY. +// if (allCookies === '' && myStorage.length !== 0) { +// localStorage.removeItem('username') +// document.querySelector("#loggeduser").innerHTML = 'You are not logged in' +// } \ No newline at end of file