LinkedIn – Auto 'Send Now' Connect requests for contacts skipping 'Add a Note' prompt

Automatically clicks the 'Send now' button shown in the "You can customize this invitation" box which shows up after clicking Connect button. If you want to Add Note instead for customized request, just temporarily disable this script first. By Dan Moorehead (dan@PowerAccessDB.com), PowerAccess™ Framework for MS Access (https://www.PowerAccessDB.com/PowerAccess-Framework-MS-Access) and Visual3D Game Engine (https://www.PowerAccessDB.com/Visual3D-Game-Engine) founder.

目前为 2017-07-26 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name LinkedIn – Auto 'Send Now' Connect requests for contacts skipping 'Add a Note' prompt
  3. // @version 1.0.1
  4. // @description Automatically clicks the 'Send now' button shown in the "You can customize this invitation" box which shows up after clicking Connect button. If you want to Add Note instead for customized request, just temporarily disable this script first. By Dan Moorehead (dan@PowerAccessDB.com), PowerAccess™ Framework for MS Access (https://www.PowerAccessDB.com/PowerAccess-Framework-MS-Access) and Visual3D Game Engine (https://www.PowerAccessDB.com/Visual3D-Game-Engine) founder.
  5. // @author Dan Moorehead (dan@PowerAccessDB.com), PowerAccess™ Framework for MS Access (https://www.PowerAccessDB.com/PowerAccess-Framework-MS-Access) and Visual3D Game Engine founder
  6. // @copyright © 2017 Dan Moorehead (dan@PowerAccessDB.com), PowerAccess™ Framework for MS Access (https://www.PowerAccessDB.com/PowerAccess-Framework-MS-Access) and Visual3D Game Engine (https://www.PowerAccessDB.com/Visual3D-Game-Engine) founder
  7. // @include /^https?://(www\.)?linkedin\.com/(search/results|in)/.*$/
  8. // @namespace https://www.PowerAccessDB.com/
  9. // @homepage https://www.PowerAccessDB.com/PowerAccess-Framework-MS-Access
  10. // @supportURL https://greasyfork.org/en/scripts/31771-linkedin-auto-send-now-connect-requests-for-contacts-skipping-add-a-note-prompt
  11. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
  12. // @grant none
  13. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQ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GS7BwDV7WDBcw93W9IhHCfMGB+OGCfOrnm18xv5PhkjEN/t/iXDpz+X/JjzgEDYz2vF5r3hLW3XnUSYjazVojlIVibTowSpUSs1Eol8vhKoUSVLpdOMlQmXBKTRvqgUiItKqhhC+ALfVx6MKijHaAAAAAElFTkSuQmCC
  14. // ==/UserScript==
  15. https://www.linkedin.com/search/results/index/?keywords=AWA%20Access&origin=GLOBAL_SEARCH_HEADER
  16. $(function () {
  17. 'use strict'; //enable function-level strict syntax mode
  18.  
  19. //CSS selector to find any button with text "Send now" which is in an Invite actions modal dialog overlay
  20. var selector = 'section.modal div.send-invite__actions > button.button-primary-large.ml3:contains("Send now")';
  21.  
  22. //begin handling late added elements to see if they are a Send now button to click:
  23.  
  24. //create alias of MutationObserver class for whatever browser-specific class name is
  25. var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver ;
  26.  
  27. //create observer to inspect elements as added to DOM
  28. var config = { childList: true, characterData: false, attributes: false, subtree: true };
  29. var observer = new MutationObserver( function (mutations) {
  30. mutations.forEach( function (mutation) {
  31. if (mutation.addedNodes) {
  32. //find any "Send now" button in descendants of added nodes + then inspect the addedNodes themselves too
  33. //if found, click them
  34. $(mutation.addedNodes).find(selector).addBack(selector).trigger("click");
  35. }
  36. });
  37. });
  38.  
  39. //begin observing any node additions anywhere in the document
  40. observer.observe(document, config);
  41.  
  42. //now click any Send now buttons that might already have been loaded before started observing
  43. $(selector).trigger("click");
  44. });