I’ve been trying to use Spotify the last couple of weeks as a substitute for Google Music. And at the moment I’m quite loving it. The account I’ve created about 3 years ago was still active but had all my old playlists on it. The problem was that this was a import from iTunes and it imported all my 283(!) playlists and unfortunately there is no easy way of deleting playlists inside Spotify.

You literately have to click EVERY. SINGLE. PLAYLIST too delete them. Luckily some guy wrote code that works with the Spotify API which resulted in this: The Unfollower. An very issue way of deleting/unfollowing playslists.

The only thing that is missing, is a single button too unfollow them all.. I’ve wrote some very small bit of JavaScript that would do just this. This piece of code will unfollow a playlist one by one automatically.

Instructions:

  1. Open Chrome, and navigate too the The Unfollower (http://static.echonest.com/TheUnfollower/), make sure you login to Spotify so it shows all your playlists.
  2. Open the Webdeveloper console when your on the page, you can do this by pressing “Ctrl + Shift +  i”, this will open a bar on the bottom of your screen. There will be a menu on the top of that bar, it will say “Elements”, “Network”, etc. Make sure you click on “Console”.
  3. Copy the below code inside the “Console” and press Enter. This will “unfollow” all playlists one by one. It will start at the bottom. This will take some time and might not work 100% the first time. Repeat step 3 until its all done.
allButtonsLen = document.getElementsByClassName('btn-danger').length-1; 
allButtons = document.getElementsByClassName('btn-danger'); 

(function myLoop (i) { setTimeout(function () { allButtons[i].click(); if (--i) myLoop(i);}, 450) })(allButtonsLen);

You can also watch this link.