Skip to content

Instantly share code, notes, and snippets.

@TechWithTy
Last active November 26, 2025 18:52
Show Gist options
  • Select an option

  • Save TechWithTy/3b64a8734be8dc0a3ba311ed907cac18 to your computer and use it in GitHub Desktop.

Select an option

Save TechWithTy/3b64a8734be8dc0a3ba311ed907cac18 to your computer and use it in GitHub Desktop.
Linked In Company Connector
(async function inviteUntilComplete(target = 20) {
const wait = ms => new Promise(r => setTimeout(r, ms));
function selectedCount() {
return document.querySelectorAll('input[type="checkbox"][aria-selected="true"]').length;
}
function unselectedCheckboxes() {
return Array.from(document.querySelectorAll('input[type="checkbox"][aria-selected="false"]'));
}
async function selectMore(limit) {
const boxes = unselectedCheckboxes().slice(0, limit);
for (const box of boxes) {
box.scrollIntoView({ behavior: "smooth", block: "center" });
await wait(400 + Math.random()*900);
box.click();
}
}
function scrollMore() {
window.scrollBy(0, 600 + Math.random()*500);
}
function sendInvites() {
const btn = document.querySelector('button.artdeco-button--primary, button[data-control-name*="invite"]');
if (btn) {
btn.click();
console.log(`πŸš€ Invited ${selectedCount()} people`);
} else {
console.warn("⚠ No send button available.");
}
}
// ------------------------------
// MAIN LOOP β€” scroll + select
// ------------------------------
while (selectedCount() < target) {
const before = selectedCount();
await selectMore(target - before);
await wait(1200 + Math.random()*1200);
if (selectedCount() === before) {
scrollMore(); // no new checkboxes found β†’ load more
await wait(2000 + Math.random()*2000);
}
console.log(`⏳ ${selectedCount()}/${target} selected`);
}
console.log(`🟒 Target reached: ${target} ready to invite`);
await wait(1500 + Math.random()*2000);
sendInvites();
})();
@TechWithTy
Copy link
Author

Added Parse For Available credits

@TechWithTy
Copy link
Author

PArsed Credits and Submits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment