From 239edec1e985cb0d96f9c7dbd87edc819a8c0970 Mon Sep 17 00:00:00 2001 From: Daniel Tam Date: Sat, 30 Jul 2022 17:09:09 -0500 Subject: [PATCH] volume slider is set to previous value on reload --- index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 7479d1a..0969628 100644 --- a/index.html +++ b/index.html @@ -363,9 +363,13 @@ var track = ''; /* Load settings */ - if (localStorage.getItem ('volume') !== null) + if (localStorage.getItem ('volume') !== null) { $('audio').get (0).volume = localStorage.getItem('volume'); - + $('#volume-slider').slider({ + value: $('audio').get (0).volume * 100 + }); + } + if (localStorage.getItem ('playlist') !== null) { if (localStorage.getItem ('playlist') in PLAYLISTS) playlist = localStorage.getItem ('playlist');