fixed MTG first load

This commit is contained in:
HearMeWhisper 2021-11-08 14:20:53 -05:00
parent b35b190a04
commit d52bc47dfc
2 changed files with 9 additions and 3 deletions

View File

@ -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)
} }
} }
}; };

View File

@ -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;
} }