O'Reilly logo

Greasemonkey Hacks by Mark Pilgrim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #99. Create Greasemonkey Scripts Automatically

Meet Platypus, the graphical interface for Greasemonkey.

By this point, you have seen the awesome power of Greasemonkey to modify pages in myriad ways. But all these hacks have one thing in common: they require writing code. Sometimes that's unavoidable, but wouldn't it be nice to be able to make simple modifications without poking through the DOM or futzing with XPath?

Meet Platypus, the graphical interface for Greasemonkey.

Running the Hack

To install Platypus, go to http://platypus.mozdev.org and click the Install Platypus link. Firefox uses a whitelist to restrict sites from automatically installing browser extensions. If you see a message at the top of the window that says that Firefox has prevented this site from installing software, click Edit Options and add the site to your whitelist, as shown in Figure 12-8.

Firefox extensions whitelist

Figure 12-8. Firefox extensions whitelist

Now, click Install Platypus again, and Firefox will prompt you to confirm that you really want to install it. Click Install, and then quit Firefox and relaunch it to complete the installation.

OK, now you should see a new option in the Tools menu named "Platypus!" Go to any web page, such as http://www.oreilly.com, and then select "Platypus!" from the Tools menu. Since this is the first time you have run Platypus, it will open its help window to show you all the available options, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required