Last active
May 13, 2024 10:32
-
-
Save terry90/25d325b457fbf55a8c12c3235d87f35f to your computer and use it in GitHub Desktop.
LinkedIn mass unfollow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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