Greasy Fork is available in English.

Add All linkedIn users (for 2017 version)

ajouter tout le monde sur linkedin et accepte tout le monde

  1. // ==UserScript==
  2. // @name Add All linkedIn users (for 2017 version)
  3. // @namespace https://greasyfork.org/fr/users/11667-aymeric-maitre
  4. // @description ajouter tout le monde sur linkedin et accepte tout le monde
  5. // @include http*://*linkedin.com/mynetwork*
  6. // @version 1.1.0
  7. // @grant none
  8. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFXRFWHRDcmVhdGlvbiBUaW1lADYvMjQvMDn2wWvjAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M0BrLToAAAAY9QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJ+8Upq2DFJ4BklsVJu4CU1zCU5zTpWyV5+7DlN4B0twB0tvCU50C1mEC1+NDFF3DGWWDmSRD2iYEFV5EmuaE1d7FGeTFVp9FWGKFW2cGFyAGHCeGmCDG3OgHWKFHnWiIGSHIXikI2iLJHumJmuNKG6PKH2oK3CSK4CrLnSVLoOtL2iDMHaXMYavM3maNHOQNIixNXaUNnycN4uzOX6eOX+fOo21O3SLPIKiPY2yPY2zPZC3PoqtP4WkP42xQJO5QoinQ5W7RYuqRpi9SIOfSI+sSZu/S5KvS5OwTJ3BTpe6T6DDUYGXUpq2UqPFVZy5VabHV566WKjJWafHW4eaW6vLXaHAYa7NYqC+Yq3MY6LBZ6K9aq7Kbq3Hc7LMdJindbjTgbTLhL/VicDXi6u5j8TZornErL7GuMbNxdDVy9ng1dzg19fX2tra3Nzc3ODh3t7e5ubm6Ojo6urq7e3t7+/v8fHx9PT09vb2+fn5+/v7/f39/////8EcrgAAABN0Uk5TAAEFBgcSFxiGh4+a1Nra4+Pm6f7wNSIAAAFdSURBVDjLrZM7T8NAEIS/tTfOA0hogIqHgJKWv4BA8HNB/AsaKjoEgoKHCDKKbdZ3RxEHUHKWKJhmdJrRzu7enQC93gkxXJYlCCyfjjpJRPf2fvGB0D9b84WPGJJ+8nxeKNlqUUUTnHVXsyLleDAJIRRPuaZhDnW2fqNM62/sk78tFCk8iisBhjB8WUxxKN4DCBDp1KM4B5CPeHeRRlEsA7iLDoKhOA/wBKxjb9Dv5TVkK+mswtRwBFyxfQj5+KAPk4fXrDHU9azJGhPobAEs7ZUFUJPgzcxMRMTsVkQGIiIiumtm9jOFAG5Kk1t2BtBxTYSfN4wfGS7BwDV7WDBcw93W9IhHCfMGB+OGCfOrnm18xv5PhkjEN/t/iXDpz+X/JjzgEDYz2vF5r3hLW3XnUSYjazVojlIVibTowSpUSs1Eol8vhKoUSVLpdOMlQmXBKTRvqgUiItKqhhC+ALfVx6MKijHaAAAAAElFTkSuQmCC
  9. // @require https://code.jquery.com/jquery-2.1.3.min.js
  10. // ==/UserScript==
  11.  
  12. var profils = [];
  13. var i = 0;
  14.  
  15. function $_GET(name, url) {
  16. if (!url) {
  17. url = window.location.href;
  18. }
  19. name = name.replace(/[\[\]]/g, "\\$&");
  20. var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
  21. results = regex.exec(url);
  22. if (!results) return null;
  23. if (!results[2]) return '';
  24. return decodeURIComponent(results[2].replace(/\+/g, " "));
  25. }
  26.  
  27. function Add_User()
  28. {
  29. profils = document.querySelectorAll('div.mn-pymk-list__action-container > .button-secondary-small');
  30. for (var i = 0; i < profils.length; i++)
  31. profils[i].click();
  32. window.open("https://www.linkedin.com/mynetwork/?BotMe=true", '_blank');
  33. }
  34.  
  35. if ($_GET('BotMe') != null)
  36. {
  37. $(document).ready(function ()
  38. {
  39. var myVar = setInterval(function() {
  40. console.log("Loop: ", i);
  41.  
  42. if(i == 35)
  43. {
  44. clearInterval(myVar);
  45. console.log("-> close");
  46. window.close();
  47. }
  48. else if(i == 30)
  49. {
  50. Add_User();
  51. console.log("-> Add User");
  52. }
  53. else if (i >= 0 && i < 30)
  54. {
  55. console.log("-> Scrolling");
  56. $("html, body").animate({ scrollTop: $(document).height()-$(window).height() });
  57. }
  58. i++;
  59. }, 2000);
  60. });
  61. }
  62. else
  63. {
  64. console.log($_GET('BotMe'));
  65. if (confirm("Enable Wilou's LinkedIn bot ?"))
  66. window.open("https://www.linkedin.com/mynetwork/?BotMe=true", '_blank');
  67. }