Skip to content

Instantly share code, notes, and snippets.

@juaxix
Created August 24, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juaxix/3d3859bd300fa4a2c64f148a043b092d to your computer and use it in GitHub Desktop.
Save juaxix/3d3859bd300fa4a2c64f148a043b092d to your computer and use it in GitHub Desktop.
Unfollow not-following back accounts from your profile, using twitter web interface and chrome JS
//Step using a browser
//1) Login into your account. Go to your profile following, example https://twitter.com/xixgames/following
//2) Go all the way to bottom to get all the parts of the accounts you follow (the new API only allow get chunks)
// --> you can do that with a scrollTo jQuery script or just keep pressed the AvPage key of your keyboard.
//3) Open developer console and copy paste this code, and change confirm_unfollow to true if you want to execute the unfollow
//Get all follows data:
var follows = $(".FollowStatus");
//Remove data from accounts who are following back:
for(var i=0;i<follows.length;i++)
{
var group = follows[i].parentElement.parentElement.parentElement;
group.parentElement.removeChild(group);
}
//get all buttons to un/follow now:
var buttons = $(".unfollow-text");
"You have " + buttons.length + " accounts not following back";
var confirm_unfollow=false; //<<-- change this to perform all the unfollows at once
if(confirm_unfollow)
{
for(var i=0;i<buttons.length; i++)
{
buttons[i].click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment