count caching

This commit is contained in:
waltem01 2022-06-22 07:31:34 +02:00
parent ae49740dfa
commit 68206097a7

View File

@ -37,6 +37,14 @@ function setup() {
};
aM.appendChild(aB);
},70*60*1000);
let saved = window.localStorage.getItem("Count");
if (saved > count)
count = saved;
document.body.onunload(()=>{
let current = window.localStorage.getItem("Count");
if (current < count)
window.localStorage.setItem("Count", count);
});
}
socket.on('connected', (c, p) => {