Remove "Attending," "Attended," "Became Fan," "Joined Group," and "Now Friends" Messages from Facebook Feeds

By Scott Frey Last update Nov 3, 2009 — Installed 1,780 times. Daily Installs: 342, 164, 152, 81, 91, 50, 102, 179, 72, 71, 54, 38, 49, 37, 45, 36, 33, 15, 11, 23, 16, 20, 11, 15, 10
Script Summary:
Remove "is attending," "attended," "became a fan," "joined the group," and "now friends" messages from Facebook's live and news feeds.
Recently Updated TopicsPosts
Live Feed2

this script has 1 topic, 2 posts

Review Summary
5 stars
3 reviews (3)
4 stars
0 reviews (0)
3 stars
0 reviews (0)
2 stars
0 reviews (0)
1 star
0 reviews (0)

this script has 3 reviews

See also:

Remove "Attending" and "Attended" Messages from Facebook Feeds (http://userscripts.org/scripts/show/61157)

Remove "Became a Fan" Messages from Facebook Feeds (http://userscripts.org/scripts/show/61158)

Remove "Joined the Group" Messages from Facebook Feeds (http://userscripts.org/scripts/show/61159)

Remove "Now Friends" Messages from Facebook Feeds (http://userscripts.org/scripts/show/61160)

UPDATE, November 2, 2009: Made a few changes that should slightly increase the speed of the script, as well as a few cosmetic changes.

UPDATE: October 30, 2009: Changed "DOMSubtreeModified" to "DOMNodeInserted," which allows the script to work in Opera and is also supported on Firefox, Chrome (dev channel at least), and Safari. (I haven't tested it in Safari and stable or beta Chrome yet, but will soon.)

NOTE: Facebook Purity (http://userscripts.org/scripts/show/44459) now includes a filter for the four categories of messages that my script blocks.

--

I created this script in response to changes to Facebook's feeds as of October 23, 2009.

The script doesn't block "tagged" messages, since I presume that those messages are more interesting to many users than "attending," "fan," "group," and "friends" messages. However, if you'd like to block "tagged" messages, you can edit the script to remove "[not(contains(text(),'tagged'))]". Alternatively, you could replace "tagged" (or add another phrase of code) with a word such as "attending" in order to unblock a different category of messages.

Initially, I included only www.facebook.com/home.php* addresses. However, I realized that other address patterns -- apparently too many to anticipate -- will also take the user to the live and news feeds. So I've included all www.facebook.com/* addresses, under the assumption that it won't block messages anywhere other than on the live and news feeds.

This is my first user script. I look forward to feedback and suggestions.

My thanks to the following:
XPath Checker: https://addons.mozilla.org/en-US/firefox/addon/...
Firefinder for Firebug: https://addons.mozilla.org/en-US/firefox/addon/...
Personalize web pages with GreaseMonkey:
http://en.kioskea.net/faq/sujet-2095-personaliz...
Alexei White's JavaScript Programmer's Reference

--

Chrome users: If you paste the source code into a plain text editor, save the file with the ending .user.js, and enable the file in Chrome as indicated on http://code.google.com/p/chromium/wiki/UserScripts, it should work. (The script is working for me in Chrome (dev channel) with either "DOMNodeInserted" or "DOMSubtreeModified.")

IE users: "DOMNodeInserted" and "DOMSubtreeModified" don't appear to be supported in IE. However, when I have some time, I'll try to make the script work in IE.