Last active
June 23, 2019 23:24
-
-
Save ezy/e8f9db449186a205b7533b7e7e037fe9 to your computer and use it in GitHub Desktop.
Delete all twitter tweets, likes and retweets via the web inspector console
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
// These scripts allow you to scrub your twitter account clean by deleting unliking | |
// and unretweeting everything. Only works on the old twitter web interface. Currently | |
// you can enable this by going to your menu and selecting to use legacy mode. | |
// delete tweets | |
setInterval( | |
function() { | |
t = $( '.js-actionDelete button' ); // get delete buttons | |
for ( i = 0; true; i++ ) { // count removed | |
if ( i >= t.length ) { // if removed all currently available | |
window.scrollTo( 0, $( document ).height() ); // scroll to bottom of page - loads more | |
return | |
} | |
$( t[i] ).trigger( 'click' ); // click and remove button from dom | |
$( 'button.delete-action' ).trigger( 'click' ); // click and remove button from dom | |
} | |
}, 2000 | |
) | |
// delete retweets | |
setInterval( | |
function() { | |
t = $( 'button.ProfileTweet-actionButtonUndo' ); // get delete buttons | |
for ( i = 0; true; i++ ) { // count removed | |
if ( i >= t.length ) { // if removed all currently available | |
window.scrollTo( 0, $( document ).height() ); // scroll to bottom of page - loads more | |
return | |
} | |
$( t[i] ).trigger( 'click' ); // click and remove button from dom | |
} | |
}, 2000 | |
) | |
// unlike tweets | |
setInterval( | |
function() { | |
t = $( 'button.ProfileTweet-action--unfavorite' ); // get delete buttons | |
for ( i = 0; true; i++ ) { // count removed | |
if ( i >= t.length ) { // if removed all currently available | |
window.scrollTo( 0, $( document ).height() ); // scroll to bottom of page - loads more | |
return | |
} | |
$( t[i] ).trigger( 'click' ); // click and remove button from dom | |
} | |
}, 2000 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment