DEV Community

Discussion on: Accepting Linkedin invitations through javascript

Collapse
 
robgpeak profile image
robgpeak

Yes that is correct. It used to be possible to select all the invitation sent and hit the withdrawal button once but they've changed the way they do it on LinkedIn, and now you need to do it one at a time, but it takes too long. That's why I'd like to see a script to do it.

Thread Thread
 
sunilaleti profile image
Sunil Aleti

var x = document.getElementsByClassName("invitation-card_action-btn artdeco-button artdeco-button--muted artdeco-button--3 artdeco-button--tertiary ember-view")
var y = document.getElementsByClassName("artdeco-modal
_confirm-dialog-btn artdeco-button artdeco-button--2 artdeco-button--primary ember-view")
for(var i=0;i<x.length;i++){
x[i].click();
for(var j=0;j<y.length;j++){
y[j].click();
}
}

p.s: If you withdraw an invitation, you won't able to resend for up to 3 weeks

Please check and let me know bcoz I dont have multiple invitations to withdraw and check it

Thread Thread
 
robgpeak profile image
robgpeak • Edited

This is going to sound really dumb, but how do I even get this script to work 😀

I'm guessing I have to put it someone in here (image attached) to get it to run? Does not look like the image uploaded... Meaning I would have to go to the page linkedin.com/mynetwork/invitation-... and view the inspector (i'm in Chrome), and then put the javascript somewhere in there?

dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
robgpeak profile image
robgpeak • Edited

Any thoughts on this Sunil? Meaning how I would get that script to do what I want it to do? I am NOT a programmer or developer... Just a mere mortal trying to solve an issue 😊

Thread Thread
 
sunilaleti profile image
Sunil Aleti

open the page where u withdraw invitations and open console and paste the above code

Thread Thread
 
robgpeak profile image
robgpeak

Hi Sunil, I do appreciate you trying to help me. Here is what happens when I paste the script in the console... loom.com/share/7c020e858da04ca78d9...

Thread Thread
 
sunilaleti profile image
Sunil Aleti

first paste those two var statements and execute, later paste that for loop and execute.
Let me know if u have any queries

Thread Thread
 
robgpeak profile image
robgpeak

I really have no idea how to get it to work? Any chance you use skype or some other screen sharing service where we could connect and I could share my screen and you can walk me through it? My skype name is robg888