Facebook friends backup in web browser

Facebook does not have a web version to backup your friends list in real time. They only provide a way to backup data through their website by receiving a link to an archive by email but you have to wait some time and cannot easily filter the data you want.
Here is a script to backup your friends list, which can also be used to find if someone unfriended you by using a diff tool to compare backups.

Download script from my server: facebook_friends_backup.js
On Pastebin
On GitHub