From fefe231e0e7d053fc14475e72e4ade2ea650368c Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Sun, 22 Sep 2024 15:20:26 -0600 Subject: [PATCH] Don't require that media progresses further to be saved --- static/script/save-media-progress.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/static/script/save-media-progress.js b/static/script/save-media-progress.js index 13a69c1..16c4f30 100644 --- a/static/script/save-media-progress.js +++ b/static/script/save-media-progress.js @@ -7,10 +7,7 @@ const pageKey = `mediaProgress_${window.location.pathname}`; // Function to save the current time of the most recently played media function saveMediaProgress(media) { - const currentProgress = parseFloat(localStorage.getItem(pageKey)) || 0; - if (media.currentTime > currentProgress) { - localStorage.setItem(pageKey, media.currentTime); - } + localStorage.setItem(pageKey, media.currentTime); } // Function to load and set the saved time for all media elements