Delete All of Your Tweets & Retweets At Once

 Delete All of Your Tweets

---------------

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, 4000); //less than 4000 might be rate limited or account suspended. increase timeout if any suspend or rate limit happens

}

delTweets();

-------

Delete All of Your Re Tweets

--------------

var undoRetweets = function() {

    var retweets = document.querySelectorAll('[data-testid="unretweet"]');

    

    retweets.forEach(function(retweetButton) {

        retweetButton.click(); // Click the unretweet button

        // Handle the confirmation dialog

        var confirmButton = document.querySelector('[data-testid="unretweetConfirm"]');

        if (confirmButton) {

            confirmButton.click();

        }

    });


    console.log(retweets.length + ' retweets undone.');

    window.scrollBy(0, 1000); // Scroll down to load more tweets

    setTimeout(undoRetweets, 5000); // Wait for 5 seconds before repeating

};


undoRetweets();


-----

Delete favorites (Go to your favorites):

----------------

var undoFavorites = function() {
    var likes = document.querySelectorAll('[data-testid="unlike"]');

    likes.forEach(function(likeButton) {
        likeButton.click(); // Click the unlike button
    });

    console.log(likes.length + ' favorites undone.');
    window.scrollBy(0, 1000); // Scroll down to load more tweets
    setTimeout(undoFavorites, 5000); // Wait for 5 seconds before repeating
};

undoFavorites();


----------



Comments

Popular Posts