Skip to content

Instantly share code, notes, and snippets.

@AElouai
Last active December 26, 2016 09:55
Show Gist options
  • Save AElouai/728d28b7d4738cc48ebaeb2f7b317e98 to your computer and use it in GitHub Desktop.
Save AElouai/728d28b7d4738cc48ebaeb2f7b317e98 to your computer and use it in GitHub Desktop.
//load jquery first
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
// how to use :>
// open 'les connaissez-vous' section
//and past the code below into the consol
// PS : change the tag in line 22 to suit your needs
String.prototype.containsAny = function(array) {
var that = this;
var result = false;
array.forEach(function(el,index,arr){
if((' ' + that.toLowerCase() + ' ').indexOf(' ' + el + ' ') != -1){
result = true;
}
});
return result;
};
$('.card-wrapper').each(function(index){
var this_card = $(this);
var title = this_card.find('.content-actions-wrapper .content .profile-info .headline span').html();
//in this section add TAG of target fiend that you want to add
var keywords = ['rh','hr','drh','hrd','recrutement','ceo','recruitment',
'recruiter','directeur','founder','ressources humaines',
'human resources','chef de projet','project manager'];
if(title != undefined && title.containsAny(keywords)){
console.log('got one ' + title);
this_card.find('.bt-request-buffed').click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment