mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 20:16:16 -04:00
wip
This commit is contained in:
parent
0cef60f90d
commit
bdbf8b846c
19 changed files with 1306 additions and 1591 deletions
|
@ -35,3 +35,23 @@ migrate("recover_high_scores", () => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
migrate("remove_long_and_creative_mode_data", () => {
|
||||
let runsHistory = JSON.parse(
|
||||
localStorage.getItem("breakout_71_runs_history") || "[]",
|
||||
) as RunHistoryItem[];
|
||||
|
||||
let cleaned=runsHistory.filter(r=> {
|
||||
if('mode' in r){
|
||||
if(r.mode !== 'short'){
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
if(cleaned.length!==runsHistory.length)
|
||||
localStorage.setItem(
|
||||
"breakout_71_runs_history",
|
||||
JSON.stringify(cleaned),
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue