How to send a connection request to all connections in 5 seconds in LinkedIn | JavaScript hack

Brijesh Dhanani
3 min readApr 11, 2021

--

Note: Please keep in mind that The content shown in this article should only be used for learning purposes only. Don’t take any unfair advantage over others.

In this article, I’ll show you how some magic of javascript. I’ll send connection requests to all people by running just a little bit of code.

Before directly diving into code let me tell you that how we can do this. So let’s LinkedIn in any browser you want and then logged in if you already don’t. Now, open developer tools first in your browser(I’m using Chrome) by just clicking right click and then inspect element. You can also open it by clicking

ctrl + shift + I 

Next, go to your network page in LinkedIn. Now inspect the over the connect button which is used for sending connection requests. Next, inspect over another button.

So you can see that both of the buttons have one common class named this. let me take another button. That button is also having a similar class? All the buttons which you’re seeing in-network page have one common class which is artdeco-button — full. So what we’ll do is we’ll get all the buttons by using artdeco-button — full class first.

Now, open your console and write the below code.

var elements = document.getElementsByClassName(“artdeco-button--full”);

ok so here we’re getting a reference to all the buttons having this same class. let me print this.

You can see that we’re getting an array of objects. can you guess what we’ll do next? yes, we’ll loop through this array, and inside our loop, we’ll trigger on click event of this connect button.

ok, let’s proceed. Write the below code in your console.

for (var i = 0, len = elements.length; i < len; i++) {    // send request to all people visible in my network in single click    elements[i].click()}

Are you ready to see some magic? Let’s hit enter and boom.

Our for loop runs until it finds the last element and it’ll fire click event for all buttons. Let’s verify whether it’s worked or not? Go to the invitations page in your linkedin and then sent. You’ll see that request sent to xyz 1 second ago. Next sent to abc1 second ago. cool right ??

So that’s all in this article. You can check the youtube video in case if you’ve any doubts or if it’s not working.

You can use this trick in any of your social media accounts you just need to change the class name in your code. You can check the code at my GitHub repo.

--

--

Brijesh Dhanani

👤 Software Engineer at Publicis Sapient, Singer, Blogger, React, JQuery, Node, Javascript. https://brdhanani.github.io