Amélioration js
This commit is contained in:
parent
8cede4db62
commit
e4fb9b60c2
2 changed files with 10 additions and 3 deletions
|
@ -118,10 +118,12 @@ main{
|
|||
|
||||
#buttonBlock{
|
||||
height:4vw;
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#button {
|
||||
margin-top:2vw;
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -166,6 +168,7 @@ footer{
|
|||
justify-content:flex-end;
|
||||
align-items: center;
|
||||
font-size:1vw;
|
||||
margin-top:2vw;
|
||||
}
|
||||
|
||||
#names{
|
||||
|
|
|
@ -7,14 +7,17 @@ let pseudo = ""
|
|||
//functions
|
||||
|
||||
function initPseudoInput(){
|
||||
console.log(pseudo);
|
||||
pseudoInput.value = ""
|
||||
console.log(pseudo);
|
||||
}
|
||||
|
||||
function initError(){
|
||||
errorTxt.innerText = ""
|
||||
}
|
||||
|
||||
function handleNavigation(){
|
||||
console.log(pseudo);
|
||||
if (pseudo){
|
||||
initError();
|
||||
button.childNodes[1].setAttribute("href","etrange_decouverte.html")
|
||||
localStorage.setItem("pseudo",pseudo);
|
||||
} else {
|
||||
|
@ -29,6 +32,7 @@ function handlePseudoChange(event){
|
|||
}
|
||||
|
||||
initPseudoInput();
|
||||
initError();
|
||||
|
||||
// event listeners
|
||||
pseudoInput.addEventListener("change",handlePseudoChange)
|
||||
|
|
Loading…
Reference in a new issue