diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-09-29 02:48:45 +0400 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-09-29 02:48:45 +0400 |
commit | fcc6d61fe195e090da33f213312d3d8bec8c1c71 (patch) | |
tree | ab415bb0d90fbb232e9cdb43b185f06d5de37f5c | |
parent | 0d40617c07ba45859b87ee80c9e7325006c916ad (diff) |
only play the music once
-rw-r--r-- | apps/media/js/player.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/media/js/player.js b/apps/media/js/player.js index b3eb5278705..3c022e9f8c4 100644 --- a/apps/media/js/player.js +++ b/apps/media/js/player.js @@ -170,9 +170,7 @@ var PlayList={ localStorage.setItem(oc_current_user+'oc_playlist_volume',volume); } } - if(PlayList.active){ - localStorage.setItem(oc_current_user+'oc_playlist_active','false'); - } + localStorage.setItem(oc_current_user+'oc_playlist_active','true'); } }, load:function(){ @@ -209,6 +207,9 @@ var PlayList={ $(document).ready(function(){ $(window).bind('beforeunload', function (){ PlayList.save(); + if(PlayList.active){ + localStorage.setItem(oc_current_user+'oc_playlist_active','false'); + } }); $('jp-previous').tipsy({gravity:'n', fade:true, live:true}); |