Created
March 3, 2019 17:07
-
-
Save cmonagle/1c89ad8aa5fb1732032a6ecd0a1cf09f to your computer and use it in GitHub Desktop.
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
/** | |
* | |
* Bulk delete twitter DMs snippet | |
* Tested 3 March 2019 on desktop Twitter in Firefox. | |
* | |
* Navigate to your DMs, copy and paste the following code | |
* into your console and hit enter. | |
* | |
* | |
*/ | |
const sleep = delay => new Promise(resolve => window.setTimeout(resolve, delay)) | |
async function deleteMessages() { | |
message = $('.DMInboxItem')[0]; | |
$(message).trigger('click'); | |
await sleep(1000); | |
$('.DMConversation-convoSettings').trigger('click'); | |
await sleep(1000); | |
$('.js-actionDeleteConversation').trigger('click'); | |
await sleep(1000); | |
$('#confirm_dialog_submit_button').trigger('click'); | |
await sleep(1000); | |
deleteMessage(); | |
} | |
await deleteMessages(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello there, wanna find out how to nagivate to your DM on the terminal. I presume that's what you meant