Skip to content

Instantly share code, notes, and snippets.

@jhqv
Created November 23, 2019 22:56
Show Gist options
  • Save jhqv/3a4e21f4597035089106ab1016d36b58 to your computer and use it in GitHub Desktop.
Save jhqv/3a4e21f4597035089106ab1016d36b58 to your computer and use it in GitHub Desktop.
Javascript bookmarklet for deleting duplicate scrobbles in Last.fm (often caused when listening to Spotify on Sonos speakers)
javascript:var elements=Array.from(document.querySelectorAll('.chartlist-row'));elements.map(function(a){var b=a.querySelector('.chartlist-name');return b&&b.textContent.replace(/\s+/g,' ').trim()}).forEach(function(a,b,c){if(a===c[b+1]||a===c[b+2]){var d=elements[b].querySelector('[data-ajax-form-sets-state="deleted"]');d&&d.click()}});
@jhqv
Copy link
Author

jhqv commented Nov 23, 2019

Created by Discord user ciN#0014, not myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment