Play random album on deezer
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
/* | |
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