Skip to content

Instantly share code, notes, and snippets.

@dandean
Created January 31, 2014 19:37
Show Gist options
  • Select an option

  • Save dandean/8741379 to your computer and use it in GitHub Desktop.

Select an option

Save dandean/8741379 to your computer and use it in GitHub Desktop.
function deleteNextTweet() {
var deleteButton = $('.js-stream-item > div:not(.retweeted) a.js-action-del')[0];
if (deleteButton) {
deleteButton.click();
setTimeout(confirmDeleteTweet, 1000);
} else {
console.log('no more tweets');
}
}
function confirmDeleteTweet() {
var deleteButton = $('#delete-tweet-dialog button.delete-action')[0];
if (deleteButton) {
deleteButton.click();
setTimeout(deleteNextTweet, 500);
} else {
console.log('no delete to confirm')
}
}
deleteNextTweet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment