Open In App

How to accept all pending connection requests on LinkedIn using JavaScript ?

Many times we get a lot of connection requests over LinkedIn, and we want to accept all of them but for that, we have to click the accept button for each connection request. With the help of the following way, we can accept all of them at once using JavaScript helping us to save our time and effort.

Approach:



Steps:






var connection = document
    .querySelectorAll(
    '.invitation-card__action-btn.artdeco-button--secondary');
 
for(var i = 0; i < connection.length; i = i + 1)
  connection[i].click();

Output:

Before running script:

After running script:

Note: 

Article Tags :