Greasemonkey Hacks is an invaluable compendium 100 ingenious hacks for power users who want to master Greasemonkey, the hot new Firefox extension that allows you to write scripts that alter the web pages you visit. With Greasemonkey, you can create scripts that make a web site more usable, fix rendering bugs that site owners can't be bothered to fix themselves, or add items to a web site's menu bar. You can alter pages so they work better with technologies that speak a web page out loud or convert it to Braille. Greasemonkey gurus can even import, combine, and alter data from different web sites to meet their own specific needs.
Greasemonkey has achieved a cult-like following in its short lifespan, but its uses are just beginning to be explored. Let's say you're shopping on an e-commerce site. You can create a script that will automatically display competitive prices for that particular product from other web sites. The possibilities are limited only by your imagination and your Greasemonkey expertise. Greasemonkey Hacks can't help you with the imagination part, but it can provide the expert hacks-complete with the sample code-you need to turn your brainstorms into reality.
More than just an essential collection of made-to-order Greasemonkey solutions, Greasemonkey Hacks is crammed with sample code, a Greasemonkey API reference, and a comprehensive list of resources, to ensure that every resource you need is available between its covers.
Some people are content to receive information from websites passively; some people want to control it. If you are one of the latter, Greasemonkey Hacks provides all the clever customizations and cutting-edge tips and tools you need to take command of any web page you view.
Chapter 1 Getting Started
Hacks 1–12: Introduction
Install a User Script
Provide a Default Configuration
Master the @include and @exclude Directives
Prevent a User Script from Executing
Configure a User Script
Add or Remove Content on a Page
Alter a Page's Style
Master XPath Expressions
Develop a User Script "Live"
Debug a User Script
Embed Graphics in a User Script
Avoid Common Pitfalls
Chapter 2 Linkmania!
Hacks 13–20: Introduction
Turn Naked URLs into Hyperlinks
Force Offsite Links to Open in a New Window
Fix Broken Pop-up Links
Remove URL Redirections
Warn Before Opening PDF Links
Avoid the Slashdot Effect
Convert UPS and FedEx Tracking Numbers to Links
Follow Links Without Clicking Them
Chapter 3 Beautifying the Web
Hacks 21–28: Introduction
Banish the Scourge of Arial
Add Stripes to Data Tables
Straighten Smart Quotes
Convert Graphical Smileys to Text
Make Amazon Product Images Larger
Convert Straight Quotes
Add Dynamic Highlighting to Tables
Make Pop-up Titles Prettier
Chapter 4 Web Forms
Hacks 29–39: Introduction
Display Form Actions in a Tool Tip
Show Hidden Form Fields
Identify Password Fields
Allow Password Remembering
Confirm Before Closing Modified Pages
Resize Text Input Fields with the Keyboard
Enter Textile Markup in Web Forms
Select Multiple Checkboxes
Keep Track of Secure Site Passwords
Automatically Log into Web Mail and Other Sites
Build Calendar Events
Chapter 5 Developer Tools
Hacks 40–46: Introduction
Remove All Page Styles on Selected Sites
Refresh Pages Automatically
Make External Stylesheets Clickable
Show Image Information
Filter Code Examples on MSDN
Intercept and Modify Form Submissions
Trace XMLHttpRequest Activity
Chapter 6 Search
Hacks 47–59: Introduction
Add a Site Search
Remove Spammy Domains from Search Results
Find Similar Images
Search Wikipedia with Google Site Search
Link to Other Search Engines from Google
Prefetch Yahoo! Search Results
Browse the Web Through Google's Cache
Add More Book Reviews to Google Print
Autocomplete Search Terms as You Type
Highlight Search Terms
Remember Recent Google Searches
Add Keyboard Shortcuts to Google Search Results
Use Recent Searches and Google SearchKeys Together
Chapter 7 Web Mail
Hacks 60–66: Introduction
Force Gmail to Use a Secure Connection
Warn Before Replying to Multiple Recipients in Gmail
Warn Before Sending Gmail Messages with Missing Attachments
Compose Your Mail in Gmail
Add a Delete Button to Gmail
Select Your Yahoo! ID from a List
Add Saved Searches to Gmail
Chapter 8 Accessibility
Hacks 67–76: Introduction
Highlight Images Without Alternate Text
Add an Access Bar with Keyboard Shortcuts
Remove Conflicting Keyboard Shortcuts
Make Image alt Text Visible
Add a Table of Contents to Long Pages
Use Real Headers on Google Web Search
Add a Toolbar to Zoom Images Easily
Make Apache Directory Listing Prettier
Add a Text-Sizing Toolbar to Web Forms
Make Google More Accessible for Low-Vision Users
Chapter 9 Taking Back the Browser
Hacks 77–84: Introduction
Reenable Context Menus on Sites That Disable Them
Bypass Weight Watchers' Browser Checker
Easily Download Embedded Movies
Break Out of Frames
Disable Targets for Downloads
Automatically Link to Printer-Friendly Versions
Restore Functionality in Google Print
Bypass Annoying Site Registrations
Chapter 10 Syndication
Hacks 85–89: Introduction
Automatically Display Unread Items in Bloglines
Zap Ugly XML Buttons
Squeeze More Feeds into the Bloglines Sidebar
Automatically Collect Syndicated Feeds
Syndicate Encrypted Content
Chapter 11 Site Integration
Hacks 90–94: Introduction
Translate Any Web Page
Warn Before Buying an Album
Find Out Who's Reading What You're Reading
Add Wikipedia Links to Any Web Page
Compare Book Prices
Chapter 12 Those Not Included in This Classification
Mark Pilgrim is an accessibility architect in the IBM Emerging Technologies Group. He is the author of several technical books, including Dive Into Python (APress) and Dive Into Accessibility, a free online tutorial on web accessibility. He lives in North Carolina with his wife and newborn son, and spends his copious free time sunbathing, skydiving, and reading Immanuel Kant's Critique of Pure Reason.