Created
November 26, 2020 03:35
-
-
Save M-ZubairAhmed/27350f588413e90cdc199d94d4d7667c to your computer and use it in GitHub Desktop.
Connect to all Linkedin connection on a page with js
This file contains 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
// Edit the classname of the connect button on Linkedin | |
const connectButtonClassname = "full-width artdeco-button artdeco-button--2 artdeco-button--full artdeco-button--secondary ember-view" | |
const allButtons = document.getElementsByClassName(connectButtonClassname) | |
const allButtonsArray = Array.from(allButtons) | |
if (allButtonsArray.length > 0){ | |
allButtonsArray.forEach(function(button){ | |
if (button.innerText === "Connect"){ | |
button.click() | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use it carefully as misuse might render you as a 'bot' by linkedin