diff options
Diffstat (limited to 'resources/js/memory.js')
-rw-r--r-- | resources/js/memory.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/js/memory.js b/resources/js/memory.js index 47608da..c0fa171 100644 --- a/resources/js/memory.js +++ b/resources/js/memory.js @@ -75,8 +75,8 @@ const Memory = { saveToLocalStorage () { const lastWrite = new Date(localStorage.getItem('lastWrite')); - if (Math.abs(new Date() - lastWrite) / (1000 * 60 * 60 * 24) >= 1) { - localStorage.setItem(`state_${(new Date()).toLocaleDateString()}`, localStorage.getItem('state')); + if (Math.abs(new Date() - lastWrite) / (1000 * 60 * 60 * 24) >= 0.25) { + localStorage.setItem(`state_${(new Date()).toLocaleDateString()}_${(new Date()).getTime()}`, localStorage.getItem('state')); } localStorage.setItem('state', Memory.saveToString()); |