diff --git a/index.html b/index.html index a5b2aed..5acf19c 100644 --- a/index.html +++ b/index.html @@ -507,8 +507,20 @@ }; }; + const saveCharacterRoster = () => { + if (!checkLocalStorage()) { + alert("Local Storage is not available, cannot save roster."); + + return; + } + + localStorage.setItem("character-roster", JSON.stringify(characterRoster)); + }; + const saveCurrentCharacter = () => { characterRoster[currentCharacter] = sheetToObject(); + + saveCharacterRoster(); }; document.addEventListener(