Skip to content

Instantly share code, notes, and snippets.

@kostasxyz
Last active October 30, 2017 21:16
Show Gist options
  • Select an option

  • Save kostasxyz/3a4b29b4ee8483f25b92b0b5948ad6cf to your computer and use it in GitHub Desktop.

Select an option

Save kostasxyz/3a4b29b4ee8483f25b92b0b5948ad6cf to your computer and use it in GitHub Desktop.
// Load all reaction profiles
function nvlInviteReactionProfiles () {
var pager = document.querySelector('#reaction_profile_pager a');
if(pager !== null) {
pager.click();
pager = null;
setTimeout(() => {
nvlInviteReactionProfiles();
}, 1600);
} else {
console.log('Loaded all profiles');
// Invite all uninvited reaction profiles
var nvlFbInviteBtns = document.querySelectorAll('a._42ft._4jy0._4jy3._517h[ajaxify]');
if(nvlFbInviteBtns.length > 0) {
nvlFbInviteBtns.forEach(function(btn, i){
setTimeout(function(){
btn.click();
console.log('Invited: ', i+1)
}, 1600 * i);
});
} else {
console.log('No uninvited profiles found');
}
}
}
nvlInviteReactionProfiles();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment