Created
January 16, 2018 08:23
-
-
Save kiriappeee/2bbeec1e3b48baec9642ced572986c73 to your computer and use it in GitHub Desktop.
Remove youtube recommendations
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
function sleep(ms){ | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function removeRecommendations(){ | |
var notInterestedButtons = document.querySelectorAll('button#button[aria-label="Not interested"]'); | |
for(var i=0; i<notInterestedButtons.length; i++){ | |
notInterestedButtons[i].click(); | |
sleep((Math.random()*1000)+1000); | |
} | |
} | |
removeRecommendations(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment