Last active
September 2, 2019 18:57
-
-
Save nramirez/5794f1fe9cc6e37583ffdc4f994af6df to your computer and use it in GitHub Desktop.
Delete linkedin connections faster
This file contains hidden or 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
// Paste this code in https://www.linkedin.com/mynetwork/invite-connect/connections/ | |
// and save 2 clicks when trying to delete a connection | |
let deleteFriend = () => { | |
$('.mn-connection-card__dropdown-option-text').click(); | |
setTimeout($('button[data-control-name=confirm_removed]').click(), 500); | |
}; | |
let handlePointsClick = () => { | |
setTimeout(deleteFriend , 200); | |
}; | |
let handleDotsClick = () => { | |
$('.mn-connection-card__dropdown').on('click', handlePointsClick); | |
}; | |
handleDotsClick(); | |
// Handle new rows after scrolling down | |
let scrollSetTime; | |
$(window).scroll(() => { | |
clearTimeout(scrollSetTime); | |
scrollSetTime = setTimeout(handleDotsClick, 500); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment