Merge pull request 'oopsie: add function that i forgot to commit' (#3) from ctucx/webmusic:master into master, fixes #2

Reviewed-on: https://git.zotan.services/zotan/webmusic/pulls/3
This commit is contained in:
Laura Hausmann 2021-03-06 00:10:13 +01:00
commit e4d9bed6be
No known key found for this signature in database
GPG Key ID: 338D7F50C0B814EE
1 changed files with 8 additions and 0 deletions

View File

@ -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;