diff --git a/templates/quiz_multiplayer.html b/templates/quiz_multiplayer.html index 2d62d37..cffc898 100644 --- a/templates/quiz_multiplayer.html +++ b/templates/quiz_multiplayer.html @@ -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(); } };