Last active
November 26, 2025 18:52
-
-
Save TechWithTy/3b64a8734be8dc0a3ba311ed907cac18 to your computer and use it in GitHub Desktop.
Linked In Company Connector
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
| (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(); | |
| })(); |
Author
Author
PArsed Credits and Submits
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added Parse For Available credits