Last active
October 30, 2017 21:16
-
-
Save kostasxyz/3a4b29b4ee8483f25b92b0b5948ad6cf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // 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