Skip to content

Instantly share code, notes, and snippets.

Last active February 21, 2022 13:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Play random album on deezer
This is semi-automated (read quick & dirty, didn't polished) way to play a random album on Deezer
You need to navigate to the fav albums page, press F12 and past this gist in the console.
(async function() {
for(let i = 0; i< 500; i++) {
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2));
var playBtn = document.querySelectorAll('button.action-item-btn[aria-label=\'Pause\']');
playBtn[Math.floor(Math.random() * playBtn.length)].click();
console.log(`${playBtn.length} albums`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment