Last active
August 29, 2015 14:08
-
-
Save billthompson/3b76a8010d4a54ad7804 to your computer and use it in GitHub Desktop.
LinkedIn Recruiter Auto Message. Bookmarklet for auto-replying to generic LI invite/recruiter requests.
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
(function() { | |
var namePieces, | |
firstName, | |
greeting, | |
message_body, | |
salutation = 'Best,', | |
myName = 'Bill', | |
fullMessage; | |
function getRecruiterName() { | |
namePieces = $('.beanName', '#recipients-composeForm').text().split(' '); | |
return namePieces; | |
} | |
function buildGreeting() { | |
var recruiterFirstName = getRecruiterName()[0]; | |
greeting = ['Hi', recruiterFirstName].join(' ') + ','; | |
return greeting; | |
} | |
function setMessageBody() { | |
message_body = "Thanks for reaching out to let me know about this position."; | |
message_body += " I'm happy in my current role, but if that should change I'll let you know."; | |
message_body += "\n\nIf I run into anyone who fits this profile, I'll send them your way!" | |
} | |
function buildMessage() { | |
greeting = buildGreeting(); | |
setMessageBody(); | |
fullMessage = [greeting, '', message_body, '', salutation, myName].join('\n'); | |
return fullMessage; | |
} | |
function setMessage() { | |
var message = buildMessage(); | |
$('#body-composeForm').val(message + $('#body-composeForm').text()); | |
} | |
setMessage(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment