Skip to content

Instantly share code, notes, and snippets.

@kiriappeee
Created January 16, 2018 08:23
Show Gist options
  • Save kiriappeee/2bbeec1e3b48baec9642ced572986c73 to your computer and use it in GitHub Desktop.
Save kiriappeee/2bbeec1e3b48baec9642ced572986c73 to your computer and use it in GitHub Desktop.
Remove youtube recommendations
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