Sfoglia il codice sorgente

SATIS Tier 之前準備

steve07s 1 anno fa
parent
commit
3b432acfd4
2 ha cambiato i file con 2 aggiunte e 12 eliminazioni
  1. 1 11
      static/js/frontend.js
  2. 1 1
      static/styles/styles.css

+ 1 - 11
static/js/frontend.js

@@ -244,18 +244,8 @@ async function handleAuthEvent(event) {
   }
 }
 function updateHeader(username) {
-  const loggedOutDivs = document.querySelectorAll('.forloggedout');
-  const loggedInDivs = document.querySelectorAll('.forloggedin');
   const usernameSpan = document.querySelector('.username');
-  if (username) {
-    usernameSpan.textContent = username;
-    loggedOutDivs.forEach(div => div.style.display = 'none');
-    loggedInDivs.forEach(div => div.style.display = 'block');
-  } else {
-    usernameSpan.textContent = 'nobody';
-    loggedOutDivs.forEach(div => div.style.display = 'block');
-    loggedInDivs.forEach(div => div.style.display = 'none');
-  }
+  usernameSpan.textContent = username ?  username : 'nobody';
 }
 
 

+ 1 - 1
static/styles/styles.css

@@ -20,7 +20,7 @@ body {
 
 .satis-tier {
   /* delete this rule when you get to satis tier, obviously */
-  display: none;
+  /* display: none; */
 }
 
 .nodisplay {