commit fff8c358ca194b9b87881054bb596d9b4a3727bb
parent f769d3e24676b1cec9f950b985a55f3dff36aa2e
Author: Leah (ctucx) <leah@ctu.cx>
Date: Fri, 5 Mar 2021 23:10:43 +0100
parent f769d3e24676b1cec9f950b985a55f3dff36aa2e
Author: Leah (ctucx) <leah@ctu.cx>
Date: Fri, 5 Mar 2021 23:10:43 +0100
oopsie: add function that i forgot to commit
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/webmusic.js b/webmusic.js @@ -142,6 +142,14 @@ function initState() { total = queue.length; } +function previousTrack() { + if (index-- === 0) + index = total-1; + if (continuelist) { + playSong(queue[index]) + } +} + function nextTrack() { if (++index === total) index = 0;