Skip to content

Instantly share code, notes, and snippets.

@terry90
Last active May 13, 2024 10:32
Show Gist options
  • Save terry90/25d325b457fbf55a8c12c3235d87f35f to your computer and use it in GitHub Desktop.
Save terry90/25d325b457fbf55a8c12c3235d87f35f to your computer and use it in GitHub Desktop.
LinkedIn mass unfollow
const SPEED = 150 // ms
// Open the console and paste this on linkedin.com/feed/following
function unfollowCurrent(elems, callback) {
console.log('Unfollowing ', elems.length, ' contacts')
elems.forEach(
(e, i) =>
setTimeout(() => e.click(), i * SPEED)
)
setTimeout(callback, elems.length * SPEED)
}
function unfollowEveryone() {
window.scroll(0, document.body.scrollHeight)
const elems = document.querySelectorAll('button.follow.is-following')
setTimeout(() => {
window.scroll(0, document.body.scrollHeight)
setTimeout(() => unfollowCurrent(elems, unfollowEveryone), 500)
}, 500)
}
unfollowEveryone();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment