Created
September 17, 2023 17:46
-
-
Save tokozedg/590f9f6fdd3e3c525944e6e1dc8aae7b to your computer and use it in GitHub Desktop.
delete all tweets - 2023
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
(function () { | |
var delTweets = function () { | |
var tweetsRemaining = document.querySelectorAll('[role="heading"]+div')[1].textContent; | |
console.log('Remaining: ', tweetsRemaining); | |
window.scrollBy(0, 10000); | |
document.querySelectorAll('[aria-label="More"]').forEach(function (v, i, a) { | |
v.click(); | |
document.querySelectorAll('span').forEach(function (v2, i2, a2) { | |
if (v2.textContent === 'Delete') { | |
v2.click(); | |
document.querySelectorAll('[data-testid="confirmationSheetConfirm"]').forEach(function (v3, i3, a3) { | |
v3.click(); | |
}); | |
} | |
else { | |
document.body.click(); | |
} | |
}); | |
}); | |
setTimeout(delTweets, 0); | |
}; | |
delTweets(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment