diff --git a/index.html b/index.html index 8334dca..7479d1a 100644 --- a/index.html +++ b/index.html @@ -143,6 +143,7 @@ }, 1000); g_current = trackid; + localStorage['current'] = g_current; } function loadNewPlaylist (playlist, track) { @@ -375,6 +376,9 @@ if (shuffle === 'false') { g_shuffle = false; + if (localStorage.getItem ('current') !== null) { + g_current = parseInt(localStorage.getItem ('current'))-1; + } } else { g_shuffle = true; @@ -382,7 +386,6 @@ toggleShuffleColor(); } - // If hash is set, override playlist and track var url_track = parseTrackId (window.location.hash.substr (1));