[Client] Fix a grammar issue and remove unneeded console logging
This commit is contained in:
		
							parent
							
								
									8776992d33
								
							
						
					
					
						commit
						633026d252
					
				@ -279,10 +279,9 @@ function renderAnswerSelectionPanel() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        button.appendChild(document.createTextNode("Couplable"));
 | 
					        button.appendChild(document.createTextNode("Couplable"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        button.addEventListener("click", (event) => {
 | 
					        button.addEventListener("click", event => {
 | 
				
			||||||
            disableCulpritButtons(culpritChoices, suspect);
 | 
					            disableCulpritButtons(culpritChoices, suspect);
 | 
				
			||||||
            if (gameData["solo"] === true) event.target.textContent = "envoie des réponses..."; 
 | 
					            event.target.textContent = gameData["solo"] === true ? "Envoi des réponses\u00A0..." : "En attente des autres joueurs\u00A0...";
 | 
				
			||||||
            else event.target.textContent = "attente des autres joueurs...";
 | 
					 | 
				
			||||||
            sendAnswers();
 | 
					            sendAnswers();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -397,7 +396,6 @@ function initSock() {
 | 
				
			|||||||
        console.log("Connected to the server!");
 | 
					        console.log("Connected to the server!");
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //TODO Send and receive userprogress when they have sent their responses
 | 
					 | 
				
			||||||
    socket.on("gameprogress", username => {
 | 
					    socket.on("gameprogress", username => {
 | 
				
			||||||
        console.log(username);
 | 
					        console.log(username);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
@ -410,7 +408,6 @@ function initSock() {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    socket.on("gamefinished", finalResults => {
 | 
					    socket.on("gamefinished", finalResults => {
 | 
				
			||||||
        console.log(finalResults);
 | 
					 | 
				
			||||||
        hideFirstClassElement("emotion_and_culprit_choices");
 | 
					        hideFirstClassElement("emotion_and_culprit_choices");
 | 
				
			||||||
        const revealScoreElement = document.createElement("h2");
 | 
					        const revealScoreElement = document.createElement("h2");
 | 
				
			||||||
        revealScoreElement.classList.add("reveal_score");
 | 
					        revealScoreElement.classList.add("reveal_score");
 | 
				
			||||||
 | 
				
			|||||||
@ -188,19 +188,11 @@ async function startGame() {
 | 
				
			|||||||
async function joinGame(event) {
 | 
					async function joinGame(event) {
 | 
				
			||||||
    username = document.getElementById("game_username").value;
 | 
					    username = document.getElementById("game_username").value;
 | 
				
			||||||
    gameid = document.getElementById("game_room_code").value;
 | 
					    gameid = document.getElementById("game_room_code").value;
 | 
				
			||||||
    console.log(username);
 | 
					    const data = {};
 | 
				
			||||||
    data = {}
 | 
					 | 
				
			||||||
    data["username"] = username;
 | 
					    data["username"] = username;
 | 
				
			||||||
    data["game_id"] = gameid;
 | 
					    data["game_id"] = gameid;
 | 
				
			||||||
    response = makeAPIRequest("joinGame",data);
 | 
					    makeAPIRequest("joinGame", data).then(() => {
 | 
				
			||||||
    response.then((value)=>{
 | 
					        window.location.href = "/lobby/" + gameid;
 | 
				
			||||||
        console.log(value);
 | 
					 | 
				
			||||||
        if (value["error"] != 0){
 | 
					 | 
				
			||||||
            //alert(value["msg"]);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else{
 | 
					 | 
				
			||||||
            window.location.href = "/lobby/" + gameid;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }, () => {
 | 
					    }, () => {
 | 
				
			||||||
        event.target.textContent = "Jouer";
 | 
					        event.target.textContent = "Jouer";
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user