Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You’ve already learned most of what you need to know to create user scripts since they’re written in JavaScript. In this section, you’ll create and test a simple script and look at some features you’ll use when creating more advanced scripts.
One of the best uses for Greasemonkey is to solve annoyances with sites you visit. For example, a site might use green text on an orange background. Although you could contact the webmaster and beg for a color change, user scripting lets you deal with the problem quickly yourself.
As a simple demonstration of user scripting, you can create a user script that changes the text and background colors of paragraphs in sites you visit. Listing 23.1 shows this user script.