Skip to content

Instantly share code, notes, and snippets.

@nramirez
Last active September 2, 2019 18:57
Show Gist options
  • Save nramirez/5794f1fe9cc6e37583ffdc4f994af6df to your computer and use it in GitHub Desktop.
Save nramirez/5794f1fe9cc6e37583ffdc4f994af6df to your computer and use it in GitHub Desktop.
Delete linkedin connections faster
// 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