Skip to content

Instantly share code, notes, and snippets.

@EwertonBello
Created January 19, 2021 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EwertonBello/298e334f1e30ac87e87b30247c786ab4 to your computer and use it in GitHub Desktop.
Save EwertonBello/298e334f1e30ac87e87b30247c786ab4 to your computer and use it in GitHub Desktop.
Script to delete all your youtube comments
// Link: https://www.youtube.com/feed/history/comment_history
// Copie e cole esse script no console da página do histórico de comentários do youtube
// Copy and paste this script into the console of the youtube comment history page
let items = document.getElementsByTagName("li");
let ariaLabel = "Excluir item da atividade";// Value in "aria-label" of delete button
for(let i=0; i < items.length; i++){
if (items[i].getAttribute("aria-label") == ariaLabel){
items[i].click();
console.log((i==items.length-1)?"Finish!":(i+1)+" deleted!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment