February 3 2009, 10:52pm

What is it?

Greasemonkey is a Mozilla Firefox extension that allows users to install scripts that make changes to most html based web pages. As Greasemonkey scripts are persistent, the changes made the web pages are executed every time the page is opened, making them effectively permenet for the user running the script.


How can it be used?

Greasemonkey can be used for adding new functions to web pages (for example, embedding price comparison in web pages), fixing bugs, combining data from multiple websites, and numerous other websites.

How is it used?

Most greasemonkey user scripts are written by hand, using site-specific javascript code that manipulates the contents of a web page using the DOM (Document Object Module interface), userscripts maintains a database of Greasemonkey scripts, and for each it lists the URL of webpages to which the scripts pertain. When the user loads a matching page, greasemonkey invokes the relevant scripts, which can then add to the page, delete parts of it, or move parts around. Greasemonkey scripts can also poll external HTTP resources, via a non-domain restricted XMLHTTP request. Greasemonkey scripts are normaly named somename.user.hs. Greasemonkey automatically detects and offers to install any such script, when a url ending in that suffic is loaded. In addition to Javascript code, Greasemonkey scripts contain limited optional metadata, which specifies the name of the script , a description, a namespace URL used to differentiate identically named scripts, and URL patterns for which the script is intended to be invoked or not.

Writing a Greasemonkey script is similar to writing JavaScript for a webpage, with some additional restrictions imposed by security provisions of mozzila XPC native wrappers.

Typical Greasemonkey scripts:

Autofill forms Alter the formatting of text, borders, graphics Remove specific content such as advertising Add links Enhance content Add extended JavaScript behaviours.

Go and get greasemonkey today.