Skip to content

Commit 983f4d2

Browse files
authored
Merge pull request #22 from ssfinney/claude/persist-game-timer-SAkHu
fix: persist game timer when resuming a saved game
2 parents 88b1551 + 19ed239 commit 983f4d2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@
604604
try{
605605
const saved=JSON.parse(raw);
606606
const modal=document.getElementById('resumeModal');
607+
timeStat.textContent=formatTime(Number(saved.elapsed) || 0);
607608
modal.hidden=false;
608609
document.getElementById('resumeYesBtn').onclick=()=>{ modal.hidden=true; applyLoadedData(saved); };
609610
document.getElementById('resumeNoBtn').onclick=()=>{ modal.hidden=true; newGame(); };

sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CACHE_NAME = 'shandoku-wife-edition-v3';
1+
const CACHE_NAME = 'shandoku-wife-edition-v4';
22
const STATIC_ASSETS = [
33
'./index.html',
44
'./style.css',

0 commit comments

Comments
 (0)