Member Sign In
Not a member?

A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.


It's fast and free.

Sign in with OpenID
Sign In
Webmonkey is a property of Wired Digital.
processing...
Join Webmonkey

Please send me occasional e-mail updates about new features and special offers from Wired/Webmonkey.
Yes No

Please send occasional e-mail offers from Wired/Webmonkey affiliated web sites and publications, and carefully selected companies.
Yes No

I understand and agree that registration on or use of this site constitutes agreement to Webmonkey's User Agreement and Privacy Policy.
Webmonkey is a property of Wired Digital.
processing...

Retrieve Sign In

Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.

or
Webmonkey is a property of Wired Digital.
processing...

Welcome to Webmonkey

A private profile page has been created for you.
As a member of Webmonkey, you can now:
  • edit articles
  • add to the code library
  • design and write a tutorial
  • comment on any Webmonkey article
Close
Webmonkey is a property of Wired Digital.

Sign In Information Sent

An e-mail has been sent to the e-mail address registered in this account.
If you cannot find it in your in-box, please check your bulk or junk folders.
Sign In
Webmonkey is a property of Wired Digital.

Greasemonkey Shows Off Political Colors

Memeorandum colored by Greasemonkey script

Andy Baio, a prominent blogger and creator of Upcoming.org, has released a Greasemonkey script to visualize the perceived political bias of linked content on the political news aggregation site Memeorandum. If a site tends to link to more left-leaning stories, it’s colored blue. Right-leaning linkers are red.

With the help of Delicious founder Joshua Schachter, Baio used a recommendation algorithm to analyze the last three months of linking behavior for each news source. With that data stored in a Google Spreadsheet, Baio used the Ajax support in Greasemonkey to grab a JSON feed and colorize the links. Those with Firefox’s Greasemonkey extension and Baio’s script installed will see the colorized links when viewing Memeorandum. Baio also released a full-fledged extension that does not require Greasemonkey.

This is a great example of how Greasemonkey can be used to change the way you view a page. In Baio’s case, he wanted to see the perceived bias of a site at a glance so he could choose a balanced view. The code from this project is available under the free and open-source GPL license. You could use it to create other ways of visualizing data on the web.

GreasemonkeyIf you’re brand new to Greasemonkey, be sure to read my new Greasemonkey tutorial on the versatile Firefox extension. If you’ve ever written JavaScript before, you’ll quickly learn the ways of Greasemonkey, which essentially gives you the ability to insert your code anywhere in someone else’s site, but only for your own use on your local machine.

You don’t need to bite off as much as Baio, who admits this is his first Greasemonkey script. One of the biggest benefits I’ve found is that I can write code to pull out the important stuff already in the page. My tutorial shows a simple example of that, where I create a floating menu of all <h2> tags on the page. It turns out this is useful for long Wikipedia entries… and Webmonkey tutorials.

See also:

Post Comment Comments Permalink Print
Reddit Digg

 
Subscribe now

Special Offer For Webmonkey Users

WIRED magazine:
The first word on how technology is changing our world.

Subscribe for just $10 a year