Created
January 30, 2016 22:09
-
-
Save esmevane/6ce3dd9fe0e701836d7d to your computer and use it in GitHub Desktop.
[ Javascript / jQuery / Spotify ]: If you ever get hacked and need to restore a ton of playlists, use this snippet
This file contains 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
var list = $('.playlist-restore button').toArray(); | |
list.forEach(function(item) { | |
var index = list.indexOf(item); | |
var timeout = index * 1000; | |
var click = function() { item.click() }; | |
setTimeout(click, timeout) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because, I was hacked and clicking a few hundred playlists once a day every time the vampiric jerk deleted my playlists got old quick.