Skip to content

Instantly share code, notes, and snippets.

@Eskuero
Created August 20, 2019 04:08
Show Gist options
  • Save Eskuero/85fc6e61ac374b564e82d1509d45867d to your computer and use it in GitHub Desktop.
Save Eskuero/85fc6e61ac374b564e82d1509d45867d to your computer and use it in GitHub Desktop.
Clean all message in a certain Twitter conversation at DMS
while (message = document.querySelector('[data-testid="messageEntry"]')) {
message.click();
var spans = document.querySelectorAll('span');
[].forEach.call(spans, function(span) {
if (span.innerHTML == "Delete") {
span.click();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment