↓ Twitter is updated more often, so read it! ↓

How to rapidly expunge Facebook’s Friend Suggestions

I really admire Facebook’s Friend Suggestions feature. It has on rare occasion shown someone to whom I’d really like to connect. Most of the time, though, it shows people who I don’t know at all and have maybe one mutual friend. So, it’s largely useless to me.

However, being the often mindless user, when I see a suggestion that may be relevant to my interests, I do visit the full friend suggestion page and see if there are any others. Rarely am I presented with anyone to whom I find a dreadful desire to connect. I still feel obligated to click that damned little [X] as if to say, “I don’t know this person.” Unfortunately, I have to repeat this approximately 25 times in order to full expunge this list of people.

So, I decided to write a little script which takes care of clicking that button for me. Navigate to the Find Friends page on Facebook and execute this script in your Firebug console. Or, prefix it with javascript: and execute it in the URL bar.

d = document.getElementsByClassName("fg_action_hide"); for (var i in d){ d[i].onclick() }

The first part gets an array (a list) of all of the clickable elements with that class, the class used to denote the [X]. The next part loops over them and executes each’s onclick() function just like as if you’d clicked it yourself.

Please note that I tested this ONLY on Firefox and Chromium, but it should work on any modern browser (read: anything but IE).

Leave a comment