diff --git a/tree/index.html b/tree/index.html index 544e799..b969cb6 100644 --- a/tree/index.html +++ b/tree/index.html @@ -23,9 +23,9 @@
-
-
- + + diff --git a/tree/index.js b/tree/index.js index 97a711d..a643c6f 100644 --- a/tree/index.js +++ b/tree/index.js @@ -12,15 +12,21 @@ function updateAvatar () { var avatar=fd.get("player_avatar") console.log("avatar", avatar); localStorage.myavatar=avatar; + } -// store username in local storage + make sure the player added it + +// store username in local storage + make sure the player added their preferences, if yes it redirect to the following page + function storeName(){ var inputPlayer = document.querySelector('#player_name').value; localStorage.playerName=inputPlayer; -if( document.querySelector('#player_name').value === '' ){ - alert('empty'); +if (document.querySelector('#player_name').value === '') { + alert('Please make sure you declared your preferences'); } +else { + window.location.href = "0_start.html"; +} }