Friday, March 28, 2008

Using Greasemonkey to "fix" a webpage

Do you use a webpage that doesn't quite get the job done? Is there just something missing? Greasmonkey to the rescue. Greasemonkey is an addon for Firefox that allows you to "fix/hack" web pages. You add different scripts to Greasemonkey that hack the page you are visiting. When the page loads, the Greasemonkey script that goes with that page is run. The script doesn't actually hack the web page on the server, it alters the way you see the web page on your computer. You can find Greasemonkey scripts here. These scripts do such varied things as adding a currency converter to eBay, a auto save for web text boxes, a bunch of stuff for Facebook (get rid of adds/spam all your friends/change page colors/make peoples profile pictures larger), etc. Heres a good run down of some good scripts.Lifehacker lists some good ones too.

Heidi likes the scripts that allow you to change the Facebook colors that you see. She really liked the Easter theme that changes the logo into an Easter basket.

I like the ability to create my own Greasemonkey scripts. One thing I've fixed with Greasmonkey is those stupid photographer's sites that don't allow you to right click (yeah like its a big deal that I grab a 360 by 240 picture of myself). Heres the code:

// ==UserScript==
// @name RightClick
// @namespace *
// @description ReEnable Right Click
// @include *
// ==/UserScript==
var eltHead=document.getElementsByTagName('head')[0];
var eltScript=document.createElement('script');
eltHead.parentNode.insertBefore(eltScript, eltHead.nextSibling);

No comments: