Skip to content

Instantly share code, notes, and snippets.

@GroomedGorilla
Last active November 5, 2018 01:06
Show Gist options
  • Save GroomedGorilla/4898514075a878102af38661ed546f42 to your computer and use it in GitHub Desktop.
Save GroomedGorilla/4898514075a878102af38661ed546f42 to your computer and use it in GitHub Desktop.
LinkedIn Recruitment Filtering (based off Wes Bos's vid)
//Run on LinkedIn's "Manage Invitations" page in your browser Console. Will Accept anyone except for those with a recruitment or consultant-related headline
//(Add your own filters to cover more terms)
[...document.querySelectorAll('.invitation-card')].forEach(card => {
const headline = card.querySelector('.invitation-card__occupation').textContent;
const acceptBtn = card.querySelector('button[data-control-name="accept"]');
const name = card.querySelector('.invitation-card__name').textContent;
if (headline.match(/recruit/gi) || headline.match(/consult/gi)) {
console.log(`I'll pass on ${name} 🙉`)
}
else {
console.log(`${name} seems worthy. 👌`)
acceptBtn.click();
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment