Skip to content

Instantly share code, notes, and snippets.

@hisivasankar
Created June 10, 2019 13:05
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 hisivasankar/a91ead79e33db55b2aeb79b8e271cf5e to your computer and use it in GitHub Desktop.
Save hisivasankar/a91ead79e33db55b2aeb79b8e271cf5e to your computer and use it in GitHub Desktop.
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