MikiSoft

LinkedIn select maximum invites for a page (fixed)

Dec 9th, 2020 (edited)
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.05 KB | None | 0 0
  1. // Open your page, click on "Invite more connections" and a dialog will open, copy everything from official JQuery script (https://code.jquery.com/jquery-3.5.1.slim.min.js), paste it in developer console (open it up with right click on page and "Inspect element") and hit Enter, thereafter execute the following:
  2.  
  3. var stop = false;
  4. function f() {
  5.   batch.each(function(_, e){ if ($(e).children('input').length && !$(e).children('input').is(':disabled')) setTimeout(function (){ e.click() }, 50); else {
  6.     stop = true;
  7.     return false;
  8.   }}).promise().done(function (){
  9.     if (stop) return;
  10.     batch = batch.last();
  11.     list[0].scrollTo(0, list[0].scrollHeight);
  12.     setTimeout(function w(){
  13.       if (!list.find('.artdeco-loader').length) {
  14.         batch = batch.nextAll(q);
  15.         if (batch.length) f();
  16.       } else setTimeout(w, 400);
  17.     }, 500);
  18.   });
  19. }
  20. var list = $('.invitee-picker__results-container'), q = '.invitee-picker-connections-result-item--can-invite:not(.invitee-picker-connections-result-item--is-disabled)', batch = list.find(q);
  21. f();
Add Comment
Please, Sign In to add comment