Skip to content

Instantly share code, notes, and snippets.

@Igloczek
Last active July 5, 2022 18:18
Show Gist options
  • Save Igloczek/400b550fffebea97827ad962056e2153 to your computer and use it in GitHub Desktop.
Save Igloczek/400b550fffebea97827ad962056e2153 to your computer and use it in GitHub Desktop.
Scripts that removes recruiters from your LinkedIn contacts
// How to use this script?
// 1. Set LinkedIn language to engligh (I just didn't test it on others)
// 2. Go to https://www.linkedin.com/mynetwork/invite-connect/connections/
// 3. Paste this script to the console and watch :)
[...document.querySelectorAll('.mn-connection-card')]
// Comment out line below, if you want to remove not only people joined your network in the last year
.filter(el => el.querySelector('.time-badge').innerText.search(/year/igm) === -1)
.filter(el => el.querySelector('.mn-connection-card__occupation').innerText.search(/recruit|rekru|hr|talent|headhunter|people|resource|hiring|build|job|researcher/gmi) !== -1)
.forEach((el, index) => {
setTimeout(() => {
el.querySelector('.mn-connection-card__dropdown-trigger').click()
setTimeout(() => el.querySelector('.artdeco-dropdown__content--is-open button').click(), 500)
setTimeout(() => document.querySelector('.artdeco-modal__actionbar--confirm-dialog .artdeco-button--primary').click(), 500)
}, index * 1000)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment