Created
February 11, 2019 08:11
-
-
Save palikhov/878b0140c8718adec3d6bd55f903b273 to your computer and use it in GitHub Desktop.
Music Tracks: for each, track prompt whether it should be deleted or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
let idx = Jukebox.playlist.models.length; | |
while(idx --> 0) { | |
const track = Jukebox.playlist.models[idx]; | |
if(confirm(`Delete track "${track.attributes.title}"?`)) { | |
track.destroy(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment