modified: templates/quiz_multiplayer.html

This commit is contained in:
SimolZimol
2025-06-07 00:07:16 +02:00
parent 5a0644988e
commit 1ff69bd5d3

View File

@@ -269,11 +269,16 @@ window.onload = function() {
label.style.display = '';
}
document.getElementById('startPosition').value = getOption('startPosition', 'start');
updateMultiplayerUI();
// Prüfe, ob MultiplayerPopup existiert und sichtbar ist
const mpPopup = document.getElementById('multiplayerPopup');
if (!mpPopup || mpPopup.style.display === 'none') {
// Prüfe, ob Namen im LocalStorage sind
const names = JSON.parse(localStorage.getItem('quizify_multiplayer_names') || "[]");
if (names.length < 2) {
// Popup anzeigen
if (document.getElementById('multiplayerPopup')) {
document.getElementById('multiplayerPopup').style.display = 'flex';
}
} else {
updateMultiplayerUI();
quizifyReady();
}
};