Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
•
c2e5d5f
1
Parent(s):
cfb1733
fix: 修复浏览器可能获取用户名失败的问题
Browse files- assets/custom.js +2 -1
assets/custom.js
CHANGED
@@ -134,10 +134,11 @@ function getUserInfo() {
|
|
134 |
if (usernameGotten) {
|
135 |
return;
|
136 |
}
|
|
|
137 |
if (userLogged) {
|
138 |
username = userInfoDiv.innerText;
|
139 |
if (username) {
|
140 |
-
if (username
|
141 |
setTimeout(getUserInfo, 500);
|
142 |
return;
|
143 |
} else if (username === " ") {
|
|
|
134 |
if (usernameGotten) {
|
135 |
return;
|
136 |
}
|
137 |
+
userLogged = localStorage.getItem('userLogged');
|
138 |
if (userLogged) {
|
139 |
username = userInfoDiv.innerText;
|
140 |
if (username) {
|
141 |
+
if (username.includes("getting user info…")) {
|
142 |
setTimeout(getUserInfo, 500);
|
143 |
return;
|
144 |
} else if (username === " ") {
|