diff --git a/background.js b/background.js index 16eef35..e106373 100644 --- a/background.js +++ b/background.js @@ -15,7 +15,24 @@ chrome.storage.sync.get('youtube_queue_extension_queue', function(data){ }); //New Feature Popup Starts -//Think about it + //add new feature +chrome.storage.sync.get('youtube_queue_extension_v140', function(data){ + if(data['youtube_queue_extension_new_v140'] == undefined) + { + chrome.storage.sync.set({'youtube_queue_extension_v140': '5*Now Drag-Drop the videos in Queue to reorder.'}, function(){ + + }); + } +}); + + //remove old feature +chrome.storage.sync.get('youtube_queue_extension_v139', function(data){ + if(!(data['youtube_queue_extension_v139'] == undefined)){ + chrome.storage.sync.remove('youtube_queue_extension_v139', function(){ + + }); + } +}); //New Feature Popup Ends function saveQueue(currentQueue){ @@ -34,8 +51,6 @@ function reorderQueue(newPositions){ if(main.songs.length == 1){ return; } - console.log(newPositions); - console.log("Next video:" + next_video); if(next_video == 0){ current = main.songs.length-1; } @@ -43,8 +58,6 @@ function reorderQueue(newPositions){ { current = next_video-1; } - console.log("Current Video" + current); - // alert(current); for(var ghi = 0; ghi 0){ + notif( msg[1]); + var newMsg = Number(msg[0]-1).toString() + "*" + msg[1]; + chrome.storage.sync.set({'youtube_queue_extension_v140': newMsg}, function(){ + + }); + } + } +}) +//New feature ends \ No newline at end of file