Skip to content

Instantly share code, notes, and snippets.

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 LockeAG/d2463da42ba6ffc74297b2acde53c11e to your computer and use it in GitHub Desktop.
Save LockeAG/d2463da42ba6ffc74297b2acde53c11e to your computer and use it in GitHub Desktop.
Delete all emails in an open folder in Protonmail
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function deleteAllMails(){
for (var i = 0;i<100;i++){
setTimeout(function(){document.getElementById("selectAll").click()},1000);
setTimeout(function(){document.getElementsByClassName("moveElement-btn-delete")[0].click()},3000);
setTimeout(function(){document.getElementById("confirmModalBtn").click()},5000);
await sleep(10000)
}
}
deleteAllMails()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment