Last active
December 12, 2017 13:24
-
-
Save glenndevenish/9d34f9aa3f7deef6cd6a31dc41ff4399 to your computer and use it in GitHub Desktop.
Automatically click 'connect' on every LinkedIn search result on the page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Automatically click 'connect' on every LinkedIn search result on the page. | |
Enter in the console, and click 'Send now' quickly on each one. | |
Requires jQuery, which is automatically loaded. | |
2.0 Features: | |
Selectively click on people with words in their profile (only works on the suggestions page) | |
Remove irrelevant suggestions from list | |
Reload page after clicking | |
*/ | |
var words = ["landscap", "horti", "nurser", "ground", "garden", "plant", "arbor", "tree"] | |
$(".mn-pymk-list__card").each( | |
function(i, obj) { | |
if(new RegExp(words.join("|")).test($(obj).text().toLowerCase())) { | |
if($(obj).children("div").children("div").children(".button-secondary-small").text().indexOf("Connect") > -1) { | |
$(obj).children("div").children("div").children(".button-secondary-small").trigger('click'); | |
} | |
} else { | |
$(obj).children("div").children(".mn-pymk-list__close-btn").trigger('click'); | |
} | |
} | |
) | |
location.reload() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This revision also works in the 'People you may know' section.