Last active
February 21, 2022 13:24
-
-
Save jprudent/78c22ba84815a3c35874bbbca73afbe3 to your computer and use it in GitHub Desktop.
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