Cancel Pending Invites

As LinkedIn recently removed the ability to cancel pending invites in batch, we've created a way to make this easy again. 

1) create a new bookmark in chrome://bookmarks/ . Just click the 3 dots in the top right and select "add new bookmark" .

2) Add these details in the dialog

In the name field enter:
Cancel Pending Invites

In the URL Field enter this block:

javascript: (async function () {function clickAndWait (sel, time = 3000) {return new Promise(function (resolve) {sel.scrollIntoView();;setTimeout(function () { resolve(); }, time);})}const NPS = '.artdeco-pagination__button--next:not(.artdeco-button--disabled)';const LIS = '.mn-invitation-list li:last-child *[data-control-name=withdraw_single]';const CFS = '.artdeco-modal .artdeco-button--primary';let nxt = document.querySelector(NPS);let lst = document.querySelector(LIS);while ( nxt || lst ){if (nxt){await clickAndWait(nxt);}else{await clickAndWait(lst, 1500);await clickAndWait(document.querySelector(CFS), 1500 );}nxt = document.querySelector(NPS);lst = document.querySelector(LIS);}})()

And hit "save"

3) navigate to

4) click the new bookmark button:

You will see that the pending invites will start being cancelled one by one, starting at the oldest one first and working its way back. To stop the script, just hit refresh in the browser or close the tab. 

Still need help? Contact Us Contact Us