Skip to content

Instantly share code, notes, and snippets.

@veeral-patel
Created April 2, 2020 17:53
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 veeral-patel/a48bbf81c8d2b8446de9744dc50cdd04 to your computer and use it in GitHub Desktop.
Save veeral-patel/a48bbf81c8d2b8446de9744dc50cdd04 to your computer and use it in GitHub Desktop.
Mass unfollow people/companies on LinkedIn
// Use this script to unfollow lots of people/companies at once on LinkedIn, without clicking the
// "Unfollow" button for every person.
// 1. Visit https://www.linkedin.com/feed/following
// 2. Apply a filter if you'd like (like only list companies)
// 3. Copy/paste the script below in your browser's JavaScript console.
// WARNING: make sure you have the right filter set! if you run this on a page with people, it will unfollow all the
// people you're following, which you may not want!
// get all buttons on the page
var buttons = document.getElementsByTagName("button")
for (let i = 0; i < buttons.length; i++) {
// click every button that says "Following", to un-follow yourself
if (buttons[i].classList.contains("is-following")) {
buttons[i].click()
console.log("clicked button " + i)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment