Skip to content

Instantly share code, notes, and snippets.

@cmonagle
Created March 3, 2019 17:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmonagle/1c89ad8aa5fb1732032a6ecd0a1cf09f to your computer and use it in GitHub Desktop.
Save cmonagle/1c89ad8aa5fb1732032a6ecd0a1cf09f to your computer and use it in GitHub Desktop.
/**
*
* 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();
@DevMeister007
Copy link

hello there, wanna find out how to nagivate to your DM on the terminal. I presume that's what you meant

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