2005-05-09
This book lives at http://diveintogreasemonkey.org/. If you're reading it somewhere else, you may not have the latest version.
This book, its sample code, and its supplementary videos are free software. You can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. This book, its sample code, and its supplementary videos are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Table of Contents
- 1. Getting Started
- 2. Your First User Script
- 3. Debugging User Scripts
- 4. Common Patterns
- 4.1. Executing a user script on a domain and all its subdomains
- 4.2. Testing whether a Greasemonkey function is available
- 4.3. Testing whether a page includes an HTML element
- 4.4. Doing something for every HTML element
- 4.5. Doing something for every instance of a specific HTML element
- 4.6. Doing something for every element with a certain attribute
- 4.7. Inserting content before an element
- 4.8. Inserting content after an element
- 4.9. Removing an element
- 4.10. Replacing an element with new content
- 4.11. Inserting complex HTML quickly
- 4.12. Adding images without hitting a central server
- 4.13. Adding CSS styles
- 4.14. Getting an element's style
- 4.15. Setting an element's style
- 4.16. Post-processing a page after it renders
- 4.17. Matching case-insensitive attribute values
- 4.18. Getting the current domain name
- 4.19. Rewriting links
- 4.20. Redirecting pages
- 4.21. Intercepting user clicks
- 4.22. Overriding a built-in Javascript method
- 4.23. Parsing XML
- 5. Case Studies
- 6. Advanced Topics
- Greasemonkey API Reference
- GM_log - log messages to the JavaScript Console
- GM_getValue - get script-specific configuration value
- GM_setValue - set script-specific configuration value
- GM_registerMenuCommand - add a menu item to the User Script Commands submenu
- GM_xmlhttpRequest - make an arbitrary HTTP request
- List of “further reading” links
- List of tips
- List of examples
- List of procedures
- Revision history
- About this book
- GNU General Public License