<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Matthew Turland &#187; Greasemonkey</title> <atom:link href="http://matthewturland.com/tag/greasemonkey/feed/" rel="self" type="application/rss+xml" /><link>http://matthewturland.com</link> <description></description> <lastBuildDate>Tue, 15 May 2012 02:29:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Modifying the Facebook Live Feed with Greasemonkey and jQuery</title><link>http://matthewturland.com/2009/11/01/modifying-the-facebook-live-feed-with-greasemonkey-and-jquery/</link> <comments>http://matthewturland.com/2009/11/01/modifying-the-facebook-live-feed-with-greasemonkey-and-jquery/#comments</comments> <pubDate>Sun, 01 Nov 2009 01:28:14 +0000</pubDate> <dc:creator>Matthew Turland</dc:creator> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Facebook]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[Greasemonkey]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false"></guid> <description><![CDATA[My wife recently expressed to me that she didn&#8217;t care for some of the events appearing in the Facebook Live Feed, namely the ones relating to her friends adding other people as friends or becoming fans of pages, because they tended to flood her feed and crowd out other events she was actually interested in. [...]]]></description> <content:encoded><![CDATA[<p>My wife recently expressed to me that she didn&#8217;t care for some of the events appearing in the Facebook Live Feed, namely the ones relating to her friends adding other people as friends or becoming fans of pages, because they tended to flood her feed and crowd out other events she was actually interested in.</p><p>Unfortunately, Facebook doesn&#8217;t provide any filtering for the feed outside of either entire applications or entire people. Upon inspecting the markup for the feed, I found that content was styled such that it was easy to refer to entire entries using CSS selectors. I then recalled that the <a
href="http://www.mozilla.org/en-US/firefox/new/?from=getfirefox" title="Firefox web browser | Faster, more secure, &amp; customizable">Firefox</a> web browser, which she uses, has available for it an extension called <a
href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/" title="Greasemonkey :: Add-ons for Firefox">Greasemonkey</a> that enables you to execute custom JavaScript for a specified set of web pages. I poked around for existing Greasemonkey user scripts to handle the task, but most seemed to try to do too much and I had trouble finding any that supported custom filtering of the Live Feed.</p><p>It had been a while since I looked at Greasemonkey, but apparently it&#8217;s gained some nice features since. One of these is the <a
href="http://wiki.greasespot.net/Metadata_block#.40require" title="Greasemonkey Manual:Metadata Block - GreaseSpot">@require tag</a>, which allows you to pull in a remote JavaScript file that Greasemonkey will smartly cache locally to be reused. I used this to add the <a
href="http://jquery.com/" title="jQuery: The Write Less, Do More, JavaScript Library">jQuery</a> library to my script using the copy hosted on <a
href="https://developers.google.com/speed/libraries/" title="Google AJAX Libraries API - Google Code">Google AJAX Library APIs</a>, at which point removing the feed entries my wife didn&#8217;t want only required a few lines of code.</p><p>I&#8217;ve pushed the user script to a <a
href="http://github.com/elazar/facebook-greasemonkey" title="elazar&#039;s facebook-greasemonkey at master - GitHub" class="broken_link"> github repository </a>if you&#8217;d like to download it. I&#8217;ve made it extensible such that removing other entries by phrase only requires adding entries to an array at the top. If you have any improvements to make, please feel free to fork it. Enjoy!</p> ]]></content:encoded> <wfw:commentRss>http://matthewturland.com/2009/11/01/modifying-the-facebook-live-feed-with-greasemonkey-and-jquery/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using disk: enhanced
Database Caching 14/17 queries in 0.007 seconds using apc

Served from: matthewturland.com @ 2012-05-21 17:13:12 -->
