Skip to content

Instantly share code, notes, and snippets.

@bitofeverything
Created August 31, 2020 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitofeverything/9b7a243193207578c8e9e743c54df598 to your computer and use it in GitHub Desktop.
Save bitofeverything/9b7a243193207578c8e9e743c54df598 to your computer and use it in GitHub Desktop.
Like all loaded components/visible items in Spotify.
// Copy paste into console, scroll to bottom of playlist/album
// type "likeAll()" in console, and scroll up and repeat.
// Could use a timeout and just keep repeating as you scroll,
// but this is quick and dirty and works well enough.
function likeAll(){
x = [...document.getElementsByClassName("spoticon-heart-16")].reverse()
x.forEach( (item)=>{
item.parentElement.click()
console.log("Liking a track")
console.log(item)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment