mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 20:46:14 -04:00
wip
This commit is contained in:
parent
42abc6bc01
commit
46228a2128
20 changed files with 226 additions and 129 deletions
13
src/generateSaveFileContent.ts
Normal file
13
src/generateSaveFileContent.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
export function generateSaveFileContent() {
|
||||
|
||||
const localStorageContent: Record<string, string> = {};
|
||||
|
||||
for (let i = 0; i < localStorage.length; i++) {
|
||||
const key = localStorage.key(i) as string;
|
||||
// Avoid including recovery info in the recovery info
|
||||
if(['recovery_data'].includes(key)) continue
|
||||
const value = localStorage.getItem(key) as string;
|
||||
localStorageContent[key] = value;
|
||||
}
|
||||
return JSON.stringify(localStorageContent);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue