diff --git a/web/assets/js/main.js b/web/assets/js/main.js index ab635a6..945627e 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -145,10 +145,12 @@ overlay_autoplay = document.getElementsByName("autoplay")[0]; if (localStorage.getItem('autoplay') == null) localStorage['autoplay'] = overlay_autoplay.checked = false; +else + overlay_autoplay.checked = localStorage['autoplay']; overlay_autoplay.addEventListener("change", e => { localStorage['autoplay'] = e.target.checked; - const media_element = overlay_content.firstChild + const media_element = overlay_content.firstChild; if (e.target.checked && media_element !== undefined) if (media_element.tagName === "AUDIO" || media_element.tagName === "VIDEO") if (media_element.ended)