1) Click on "See All" under Invite friends tab
2) Make sure the list is by "Search all friends"
3) scroll down to the bottom of the list (this is required so all "invite" buttons are loaded up and hence would be clicked by scrip)
4) Right click and select "Inspect Element"
5) Click on Console tab
6) type in the script for clicking
7) wait for 2 minutes until it says invite sent for all.