Created
June 10, 2019 13:05
-
-
Save hisivasankar/a91ead79e33db55b2aeb79b8e271cf5e to your computer and use it in GitHub Desktop.
Delete Tweets based on some condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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