Skip to content

Instantly share code, notes, and snippets.

@aarondunphy
Last active October 27, 2020 20:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarondunphy/386c4da4b5905605ce3980b37baa33e6 to your computer and use it in GitHub Desktop.
Save aarondunphy/386c4da4b5905605ce3980b37baa33e6 to your computer and use it in GitHub Desktop.
Go to https://www.linkedin.com/feed/following/ and scroll to the bottom of the page so all the people you are following have loaded in. Paste the following code into the browser console. Make sure to update your keywords that you want to unfollow people by.
let people = document.querySelectorAll('.follows-recommendation-card');
let keywords = ['recruiter', 'recruitment', 'hunter', 'headhunter', 'acquisition', 'talent'];
people.forEach(person => {
if(person.querySelector('.follows-recommendation-card__headline')){
let headline = person.querySelector('.follows-recommendation-card__headline').innerText.toLowerCase();
let shouldUnfollow = false;
keywords.forEach(keyword => {
if(headline.includes(keyword)){
shouldUnfollow = true;
}
})
if(shouldUnfollow){
person.querySelector('.follows-recommendation-card__follow-btn').click();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment