Last active
January 11, 2020 12:58
-
-
Save fakeheal/28bf1fa3f80bdad6686fd6b4ed785bc6 to your computer and use it in GitHub Desktop.
Easily unfollow people on last.fm
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
/** | |
* 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