Skip to content

Instantly share code, notes, and snippets.

@Whelton
Last active April 16, 2018 02:57
Show Gist options
  • Save Whelton/746782068c2ff41aa8d7 to your computer and use it in GitHub Desktop.
Save Whelton/746782068c2ff41aa8d7 to your computer and use it in GitHub Desktop.
LinkedIn Bulk Accept Invitations Magical Hacky Script
/*
* LinkedIn Bulk Accept Invitations Super Magical Hacky Script
*
* Just past this as a whole into the JavaScrip console on Chrome (or browser of choice)
*
*/
// function simulating the clicks on checkbox and 'accept' button
var catsFromSpace = function(){
console.log("Doing the bulk invite dance"); // Log it, log it real good
$('.bulk-chk').trigger("click"); // Click the checkbox
$(".bulkContainer-new > li:first > a").trigger("click") //Click the 'accept' button
}
catsFromSpace(); // Fire this to tick the checkbox and do the biz-i-ness
// Now listen for when the success alert box shows up
$("#global-error").bind("DOMSubtreeModified", function() {
// check if checkbox is unchecked (it unchecks after successful accepting invites )
if (!$(".bulk-chk").is(':checked')) {
catsFromSpace(); // Rinse, repeat.....
}
});
@minhajkk
Copy link

minhajkk commented Jul 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment