Persist player display names
This commit is contained in:
parent
734b01ea5d
commit
0faf0b04bc
4 changed files with 21 additions and 9 deletions
|
|
@ -7,11 +7,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const cancelButton = document.getElementById('cancel-display-name-button');
|
||||
|
||||
// Get playerId from meta tag
|
||||
const playerIdMeta = document.querySelector('meta[name="playerId"]');
|
||||
const playerId = playerIdMeta ? playerIdMeta.content : 'UnknownPlayer';
|
||||
const displayNameMeta = document.querySelector('meta[name="displayName"]');
|
||||
const initialDisplayName = displayNameMeta ? displayNameMeta.content : 'UnknownPlayer';
|
||||
|
||||
// Initialize display name with player ID
|
||||
displayNameSpan.textContent = playerId;
|
||||
// Initialize display name with initial name
|
||||
displayNameSpan.textContent = initialDisplayName;
|
||||
|
||||
function setEditMode(isEditing) {
|
||||
if (isEditing) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue