aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarsVomMars2021-01-29 13:42:31 +0100
committerLarsVomMars2021-01-29 13:42:31 +0100
commite83901076f3d15f5d601d53237f886b7bc34f50b (patch)
tree1eefbdeb67ec4f74daa9e08a5abaadbae0285263
parent5eb14d6d09638c9ba3f034a019a8cd54c512b238 (diff)
Hmm
-rw-r--r--profile/public/style.css6
-rw-r--r--profile/public/user.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/profile/public/style.css b/profile/public/style.css
index 66c0bdf..db3457a 100644
--- a/profile/public/style.css
+++ b/profile/public/style.css
@@ -54,12 +54,14 @@ img {
}
#user h1,
-#comments h2 {
+#comments h2,
+#char h2 {
cursor: pointer;
}
#user h1:hover,
-#comments h2:hover {
+#comments h2:hover,
+#char h2:hover {
opacity: 0.8;
}
diff --git a/profile/public/user.js b/profile/public/user.js
index 9a55682..6dfb95b 100644
--- a/profile/public/user.js
+++ b/profile/public/user.js
@@ -10,10 +10,10 @@ function addUser(userData) {
const questions = userData.questions;
const user = userData.user;
for (const questionID in questions) {
- if (!questions.hasOwnProperty(questionID)) continue;
+ if (!questions.hasOwnProperty(questionID) || questions[questionID].type === "file") continue;
const question = questions[questionID];
const div = document.createElement("div");
- div.innerHTML = `<b>${question.question.replace(/</g, "&lt;").replace(/>/g, "&gt;")}</b> <span>${question.answer.replace(/</g, "&lt;").replace(/>/g, "&gt;") || ""}</span>`;
+ div.innerHTML = `<b>${question.question.replace(/</g, "&lt;").replace(/>/g, "&gt;")}</b> <span>${(question.answer || "Hitler").replace(/</g, "&lt;").replace(/>/g, "&gt;") || ""}</span>`;
divs.push(div);
}
const h1 = document.createElement("h1");