Skip to content

Instantly share code, notes, and snippets.

@fakeheal
Last active January 11, 2020 12:58
Show Gist options
  • Save fakeheal/28bf1fa3f80bdad6686fd6b4ed785bc6 to your computer and use it in GitHub Desktop.
Save fakeheal/28bf1fa3f80bdad6686fd6b4ed785bc6 to your computer and use it in GitHub Desktop.
Easily unfollow people on last.fm
/**
* Open console and paste the following code.
*
* If you have multiple pages with people you're following,
* wait for the page to refresh and the press on your keyboard:
* ARROW UP + ENTER.
*
* This will execute the two lines above, unfollowing the people from the page.
*/
//Get all buttons for un-following
const buttons = document.querySelectorAll("button[value='unfollow']");
buttons.forEach(button => {
//clicking the button submits the un-follow form
button.click();
});
//reload the page and execute the script after that, by pressing ARROW UP and ENTER
//timeout added as last.fm needs time to update your list ;p
setTimeout(() => window.location.reload(), 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment