Skip to content

Instantly share code, notes, and snippets.

@harmtemolder
Created October 19, 2019 07:55
Show Gist options
  • Save harmtemolder/dc0eafe0af685c79fc9f9040e6309e29 to your computer and use it in GitHub Desktop.
Save harmtemolder/dc0eafe0af685c79fc9f9040e6309e29 to your computer and use it in GitHub Desktop.
Pasting this script in your developer console will select all emails in the current view, click the trash button and repeat
(function myLoop (i) {
setTimeout(function () {
$('#selectAll').click();
setTimeout(() => {$('.toolbar-btn-trash')[0].click()}, 2000);
if (--i) myLoop(i);
}, 4000)
})(25);
@harmtemolder
Copy link
Author

A variation that will unstar all in folder:

(function myLoop (i) {          
  setTimeout(function () {   
    $('.starButton-unstar').click();
    if (--i) myLoop(i);
  }, 2000)
})(25);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment