summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/common/play.css9
-rw-r--r--public/common/play.js5
2 files changed, 13 insertions, 1 deletions
diff --git a/public/common/play.css b/public/common/play.css
index 8fe084e..fd99175 100644
--- a/public/common/play.css
+++ b/public/common/play.css
@@ -326,6 +326,15 @@ header .viewpoint_button.selected:active:hover {
white-space: nowrap;
}
+.role_user a {
+ text-decoration: none;
+ color: black;
+}
+
+.role_user a:hover {
+ text-decoration: underline;
+}
+
.role_name::before {
content: "\25cb ";
opacity: 0.6;
diff --git a/public/common/play.js b/public/common/play.js
index e34f42c..73566bd 100644
--- a/public/common/play.js
+++ b/public/common/play.js
@@ -381,7 +381,10 @@ function on_game_over() {
function init_player_names(players) {
for (let i = 0; i < roles.length; ++i) {
let p = players.find(p => p.role === roles[i].role)
- document.getElementById(roles[i].id).querySelector(".role_user").textContent = p ? p.name : "NONE"
+ if (p)
+ document.getElementById(roles[i].id).querySelector(".role_user").innerHTML = `<a href="/user/${p.name}" target="_blank">${p.name}</a>`
+ else
+ document.getElementById(roles[i].id).querySelector(".role_user").textContent = "NONE"
}
}