var a = Array.prototype.slice.call(
How to use it
Open Facebook page for which you need to send invites, Make sure there is a peoples section on that page though which invites can be sent.
open console. via right click –> Inspect element –> Console. and pasting above script followed by enter.
How it works
It works as a daemon which will first click on show more friends button and then click invite against all friends listed in that list, one by one.
Key elements to write such scripts or modify this script
You need to know specific components of this script and their usage to modify it
3. getElementsByTagName – To get all child buttons which we target to click on.