Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete Tweets based on some condition
const condition = ''; // eg. '<some-content>'
const targetClassToFindInfo = ''; // Eg '.tweet-text'
$('li.js-stream-item').each(function(index, tweet) {
const text = $(tweet).find(".content " + targetClassToFindInfo)[0].innerText;
if(text.indexOf(condition) > 0) {
$(tweet).find('.js-actionDelete').click();
$('.delete-action').click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment