fixed MTG first load
This commit is contained in:
parent
b35b190a04
commit
d52bc47dfc
@ -8,12 +8,16 @@ window.onunload = function(){
|
|||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
localStorage.getItem('playerCount');
|
localStorage.getItem('playerCount');
|
||||||
for (i=1; i<9; i++){
|
for (i=1; i<9; i++){
|
||||||
|
if (localStorage.getItem('playerName'+i)){
|
||||||
document.getElementById('name'+i).innerHTML = localStorage.getItem('playerName'+i);
|
document.getElementById('name'+i).innerHTML = localStorage.getItem('playerName'+i);
|
||||||
document.getElementById('lifeCount'+i).innerHTML = 20
|
console.log(document.getElementById('name'+i).innerHTML)
|
||||||
if (document.getElementById('lifeCount'+i).innerHTML != ""){
|
}
|
||||||
|
|
||||||
|
if (localStorage.getItem('lifeCount'+i)){
|
||||||
|
|
||||||
document.getElementById('lifeCount'+i).innerHTML = localStorage.getItem('lifeCount'+i)
|
document.getElementById('lifeCount'+i).innerHTML = localStorage.getItem('lifeCount'+i)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -129,9 +129,11 @@
|
|||||||
#buttonWrapper{
|
#buttonWrapper{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content:space-around;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user