|
|
|
@ -12,14 +12,20 @@ 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";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|