Skip to content

Instantly share code, notes, and snippets.

@hook-s3c
Forked from taviso/delete-twitter-dm.js
Created November 6, 2018 16:24
Show Gist options
  • Select an option

  • Save hook-s3c/b7c39dfb75cac1ff3f87051ce112134a to your computer and use it in GitHub Desktop.

Select an option

Save hook-s3c/b7c39dfb75cac1ff3f87051ce112134a 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