Created
November 5, 2018 05:03
-
-
Save judah-caruso/b25c9e5ddad3c511f16b142dea623277 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var numTweets = parseInt(document.querySelector("[data-count]").innerHTML.replace(/\s+/, "")); | |
function deleteTweet() { | |
document.getElementsByClassName("ProfileTweet-actionButton")[0].click(); | |
document.getElementsByClassName("js-actionDelete")[0].click(); | |
document.getElementsByClassName("delete-action")[0].click(); | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function deleteTweets() { | |
for (i = 0; i < numTweets; i++) { | |
deleteTweet(); | |
await sleep(1200); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment