Skip to content

Commit

Permalink
delete field name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Donot committed May 24, 2024
1 parent 6c640fc commit 630775a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ <h1 id="username"></h1>
<div class="popup-content">
<h2>Félicitations !</h2>
<p>Vous avez gagné la partie !</p>
<input id="username" placeholder="Entrez votre nom" maxlength="20"/>
<button id="save-button">Sauvegarder</button>
<button id="close-popup" onclick="closePopup()">Fermer</button>
</div>
Expand Down
3 changes: 1 addition & 2 deletions script/pushInDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ const firebaseConfig = {
measurementId: "G-9L5RKZ5P2R"
};

console.log(JSON.parse(localStorage.getItem('username')))
document.getElementById("username").innerHTML = JSON.parse(localStorage.getItem('username')).username;

async function saveWinInDB() {
var username = document.querySelector("#username").value;
var username = document.getElementById("username").innerHTML;
if (username == "") {
console.log("Entrez un nom !");
return;
Expand Down

0 comments on commit 630775a

Please sign in to comment.