Created
July 29, 2020 16:35
-
-
Save lyndsysimon/e6a4a1becaddf09fe02c503793b545d6 to your computer and use it in GitHub Desktop.
Revisions
-
lyndsysimon created this gist
Jul 29, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ /* Lyndsy's Protonmail mass archiver * * This is a simple script that marks all emails in a folder as * read and archives them. * * I wrote it to work against the Protonmail Beta interface: * https://beta.protonmail.com * * Usage: * - Navigate to your inbox (or another folder, presumably) * - Open your browser's developer tools' Javascript console * - Paste in this script * - Go get a cup of coffee; or maybe just go to bed if you have * as many unread emails as I did :) */ let markAsRead = function() { $('a.pm-group-button')[0].click() }; let selectAll = function() { $("#selectAll").click() }; let archive = function() { $('button[data-action=archive]').click() }; function markAsReadAndArchive() { selectAll(); setTimeout(markAsRead, 1000); setTimeout(archive, 3000); } setInterval(markAsReadAndArchive, 10000);