summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webmusic.js8
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;