advertisement

Print

What Is Greasemonkey
Pages: 1, 2, 3, 4

The first user script I ever wrote was called Butler. It adds functionality to Google search results. To see a brief description of the functionality that Butler offers, visit the Butler home page. To install it, right-click (Control-click on a Mac) the link titled "Download version 0.3." From the context menu, select "Install User Script...."



Greasemonkey pops up a dialog titled "Install User Script," displaying the name of the script you are about to install (Butler), a brief description of what the script does, and a list of included and excluded pages. All of this information is taken from the script itself, as we'll see in a moment. (See Figure 2.)

figure 2
Figure 2: Install user script

Click OK to install the Butler user script. If all went well, Greasemonkey displays the following alert: "Success! Refresh page to see changes."

Now, search for something in Google. In the search results page, there is a line at the top of the results that says "Try your search on Yahoo, Ask Jeeves, AlltheWeb, ...," [figure 3]. There is also a banner along the top that says "Enhanced by Butler." All of these options were added by the Butler user script. (See Figure 3.)

figure 3
Figure 3: Butler-enhanced search results

In addition to web search results, Butler also alters image search results by adding links to a variety of image search engines (See Figure 4). It even adds links in Froogle to other product comparison and shopping sites. (See Figure 5.)

figure 4
Figure 4: Butler-enhanced image search results

figure 5
Figure 5: Butler-enhanced product search results

Pages: 1, 2, 3, 4

Next Pagearrow