diff options
author | Leah (ctucx) <leah@ctu.cx> | 2021-03-05 23:10:43 +0100 |
---|---|---|
committer | Leah (ctucx) <leah@ctu.cx> | 2021-03-05 23:10:43 +0100 |
commit | fff8c358ca194b9b87881054bb596d9b4a3727bb (patch) | |
tree | dd4c6be7e34a1327d8c4cb5d029aea7a86465327 | |
parent | f769d3e24676b1cec9f950b985a55f3dff36aa2e (diff) |
oopsie: add function that i forgot to commit
-rw-r--r-- | webmusic.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webmusic.js b/webmusic.js index 24de390..03e57a3 100644 --- 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; |