From e76732077d24eb5b1cc808a27d01a7faaa5ebc8e Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 25 Jul 2021 11:55:47 -0700 Subject: [PATCH] Commented out some things on logout --- logout.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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