1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 01:34:43 -05:00

use beforeunload :3

This commit is contained in:
Ashley //// 2024-04-21 03:16:07 +00:00
parent e5a6092a25
commit 1af6240596

View file

@ -183,10 +183,8 @@ function resumeProgress() {
}
}
video.addEventListener('timeupdate', () => {
if (Math.floor(video.currentTime) % 5 === 0) {
saveProgress();
}
window.addEventListener('beforeunload', () => {
saveProgress();
});
video.addEventListener('ended', () => {