File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 97
97
window . onload = async function ( ) {
98
98
try {
99
99
if ( localStorage . getItem ( 'loggedIn' ) === 'true' ) {
100
- const usernameEncoded = localStorage . getItem ( 'username ' ) ;
100
+ const usernameEncoded = localStorage . getItem ( 'usernameEnc ' ) ;
101
101
const username = decodeUsername ( usernameEncoded ) ; // Decode the username using atob
102
+ localStorage . setItem ( 'username' , username )
102
103
103
104
document . getElementById ( 'authSection' ) . style . display = 'none' ;
104
105
document . getElementById ( 'loggedInContent' ) . style . display = 'block' ;
127
128
128
129
if ( username ) {
129
130
const decodedUsername = decodeUsername ( username ) ; // Decode the username using atob
130
- localStorage . setItem ( 'username ' , username ) ; // Store the original Base64-encoded username
131
+ localStorage . setItem ( 'usernameEnc ' , username ) ; // Store the original Base64-encoded username
131
132
localStorage . setItem ( 'loggedIn' , 'true' ) ;
132
133
window . location . href = 'index.html' ;
133
134
}
You can’t perform that action at this time.
0 commit comments