Forked from icodeforlove/linkedin-auto-endorser.js
Last active
March 14, 2017 17:05
-
-
Save DeftNerd/4abf63c7d0e680d62a2cd26d5340c9f3 to your computer and use it in GitHub Desktop.
Endorse everyone on linkedin
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 csrfToken = $('[name="csrfToken"]').val(); | |
var profiles = 120 + Math.floor(Math.random() * (25 - 1 + 1)) + 1; | |
$.getJSON('https://www.linkedin.com/hp/modules/ozfeed/promo/endorsements/fetch?offset=0&count=' + profiles, function (response) { | |
var endorsements = response.endorsements; | |
console.log('found ' + endorsements.length + ' endorsements'); | |
function endorse (callback) { | |
var endorsement = endorsements.shift(); | |
if (!endorsement) { | |
return console.log('done'); | |
} | |
console.log('endorsing "' + endorsement.endorsee.fullName + '" for "' + endorsement.skillName + '"'); | |
$.post('https://www.linkedin.com/hp/modules/ozfeed/promo/endorsements/accept', { | |
csrfToken: csrfToken, | |
signature: endorsement.signature | |
}, function (response) { | |
setTimeout(function () { | |
endorse(); | |
}, 4000 + Math.random() * 2000) | |
}); | |
} | |
endorse(); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changed this to generate between 100 and 125 endorsements.