Forked from rosenpin/protonmail-delete-all-in-folder.js
Created
April 20, 2022 01:45
-
-
Save LockeAG/d2463da42ba6ffc74297b2acde53c11e to your computer and use it in GitHub Desktop.
Delete all emails in an open folder in Protonmail
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 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