Skip to content

Instantly share code, notes, and snippets.

@lbell
Last active November 4, 2020 18:33
Show Gist options
  • Select an option

  • Save lbell/ff1a01f36cf05a475cd461a3285c7307 to your computer and use it in GitHub Desktop.

Select an option

Save lbell/ff1a01f36cf05a475cd461a3285c7307 to your computer and use it in GitHub Desktop.
Console Script to Unfollow All Friends (and/or Pages and Groups) in Facebook
/*
* Works with new Facebook (2020)
*
* 1) Click Down Arrow menu (top right) -> Settings & Privacy -> News Feed Prefences.
* 2) Choose Unfollow, then select All, Friends Only, Pages Only, etc.
* 3) Scroll to the bottom of the modal window (until all your friends / pages etc untill Facebook can't find any more.
* 4) Copy/Paste this script into your browser console (Chrome: ctrl-shift-j) and hit Enter
*
*/
const follows = document.querySelectorAll('div[aria-label="Toggle to follow"]')
for (let i = 0; i<follows.length; i++) {
setTimeout(() => follows[i].click(), i * 500)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment