Last active
July 22, 2024 17:18
-
-
Save YDrall/77fad9e5dfe51deae5b9155a770e392f to your computer and use it in GitHub Desktop.
Bulk accept LinkedIn invites
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 script in the js console of https://www.linkedin.com/mynetwork/invitation-manager/ page and enjoy. | |
const sleep = (ms) => new Promise((res) => setTimeout(res, ms)); | |
async function acceptAll () { | |
while(true) { | |
const items = document.querySelectorAll('button.artdeco-button--secondary'); | |
if (items.length === 0) break; | |
for (var i=0 ; i<items.length; i++) { | |
const item = items[i]; | |
console.log(item); | |
item.click(); | |
await sleep(1000); // To avoid 499(too many request) errors. | |
}; | |
} | |
} | |
acceptAll() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment