Created
November 7, 2025 13:46
-
-
Save ScriptRaccoon/4c4812d7fb15e4588f2d793f2e531052 to your computer and use it in GitHub Desktop.
Script to remove all liked songs on last.fm
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
| /** | |
| * Use this script on https://www.last.fm/user/{your_user_name}/loved | |
| * to remove all your loved songs on last.fm. | |
| */ | |
| function click_unlike_button() { | |
| const button = document.querySelector('.chartlist-love-button') | |
| if (!button) { | |
| const next_page_link = document.querySelector('.pagination-next a') | |
| if (!next_page_link) { | |
| window.alert('All songs have been unliked') | |
| return | |
| } | |
| next_page_link.click() | |
| setTimeout(click_unlike_button, 5000) | |
| } | |
| button.scrollIntoView({ block: 'center', behavior: 'smooth' }) | |
| button.style.outline = '1px solid blue' | |
| const delay = 1000 + Math.random() * 500 + (Math.random() < 0.2 ? 1000 : 0) | |
| setTimeout(() => { | |
| button.click() | |
| button.remove() | |
| click_unlike_button() | |
| }, delay) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment