Skip to content

Instantly share code, notes, and snippets.

@vincenavarro
Last active October 2, 2022 23:53
Show Gist options
  • Save vincenavarro/982c9cc6e188d620f04690fd424aa07b to your computer and use it in GitHub Desktop.
Save vincenavarro/982c9cc6e188d620f04690fd424aa07b to your computer and use it in GitHub Desktop.
Click all endorsements on linkedin.

Click all endorsements on linkedin.

Updated for new LinkedIn

Demo Video

// Finds all endorsement buttons and clicks them with a 1.5 second delay between
const checkEndorsements = () => {
let clickCount = 0;
document.querySelectorAll('span').forEach(el => {
if (el.textContent.includes('Endorse') && !el.textContent.includes('Endorsed')) {
clickCount++;
setTimeout(el.click(), clickCount * 1500);
};
});
return clickCount + ' endorsements clicked.';
};
checkEndorsements();
// Rewrite https://www.linkedin.com/mynetwork/invite-connect/connections/ addresses to their skillpage directly.
document.querySelectorAll("a[href*='/in/']").forEach(el => {
let url = el.getAttribute('href');
el.setAttribute('href', url + 'details/skills/');
});
// Open in new tabs instead.
document.querySelectorAll("a[href*='/in/']").forEach((el, i) => {
let url = el.getAttribute('href');
setTimeout(() => {
window.open('https://www.linkedin.com' + url + 'details/skills/', '_blank');
}, i * 500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment