Skip to content

Instantly share code, notes, and snippets.

@hackingbutlegal
Forked from taviso/delete-twitter-dm.js
Created January 30, 2019 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackingbutlegal/809451a54e23782281450e94513f117d to your computer and use it in GitHub Desktop.
Save hackingbutlegal/809451a54e23782281450e94513f117d to your computer and use it in GitHub Desktop.
Automate deleting twitter direct messages.
// Open direct messages window, paste this into console.
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);
setTimeout('document.getElementById("confirm_dialog_submit_button").click()', 2000);
}
var tmr = setInterval(deleteNextConversation, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment