Created
February 7, 2022 10:10
-
-
Save xsawyerx/96e36434606812562bb1e216f0537bdb to your computer and use it in GitHub Desktop.
Remove all Twitter followers and likes
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
// These may take a bit to run, depending on how much you have, | |
// but you should be done by morning if you leave it over night with the right configuration | |
// Open Twitter profile likes page | |
// Copy paste the minified jquery straight into the console | |
// Adjust the interval and count as you wish | |
var count = 1; | |
var interval = setInterval( clearLikes, 600 ); | |
function clearLikes() { | |
count++; | |
window.scrollBy( 0,200 ); | |
$('div').each( function(idx, elem) { | |
if ( $(elem).attr('data-testid') && $(elem).attr('data-testid') === 'unlike' ) { | |
elem.click(); | |
} | |
}); | |
if ( count > 500 ) { | |
clearInterval(interval); | |
} | |
} | |
// Open Twitter profile following page | |
// Copy paste the minified jquery straight into the console | |
// Adjust the interval and count as you wish | |
var count = 1 | |
var interval = setInterval( clearFollowers, 600 ); | |
function clearFollowers() { | |
$('div').each( function( idx, elem ) { | |
if ( $(elem).attr('data-testid') && $(elem).attr('data-testid').indexOf('-unfollow') != -1 ) { | |
$(elem).click(); | |
$('div').each( function (idx2, elem2) { | |
if ( $(elem2).text() === "Unfollow" ) { $(elem2).click(); } | |
}); | |
} | |
}); | |
window.scrollBy( 0, 200 ); | |
count++; | |
if ( count > 500 ) { clear_interval(interval); } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment