Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
45Activity
0 of .
Results for:
No results containing your search query
P. 1
Dive Into Greasemonkey

Dive Into Greasemonkey

Ratings:

4.79

(14)
|Views: 15,888 |Likes:
Published by fluffy1777
Dive Into Greasemonkey Copyright © 2005 Mark Pilgrim http://diveintogreasemonkey.org/
Dive Into Greasemonkey Copyright © 2005 Mark Pilgrim http://diveintogreasemonkey.org/

More info:

Published by: fluffy1777 on Mar 08, 2007
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/08/2013

pdf

text

original

 
Dive Into Greasemonkey
 
Table of Contents
Dive Into Greasemonkey.................................................................................................................................................1Chapter 1. Getting Started..............................................................................................................................................2
1.1. What is Greasemonkey?................................................................................................................................21.2. Installing Greasemonkey...............................................................................................................................31.3. Installing a user script....................................................................................................................................41.4. Managing your userscripts............................................................................................................................5
Chapter 2. Your First User Script..................................................................................................................................7
2.1. Hello World...................................................................................................................................................72.2. Describing your user script with metadata.....................................................................................................82.3. Coding your user script................................................................................................................................102.4. Editing your user script................................................................................................................................12
Chapter 3. Debugging User Scripts..............................................................................................................................13
3.1. Tracking crashes with JavaScript Console..................................................................................................133.2. Logging withGM_log.................................................................................................................................143.3. Inspecting elements with DOM Inspector...................................................................................................153.4. Evaluating expressions with Javascript Shell..............................................................................................173.5. Other debugging tools..................................................................................................................................19
Chapter 4. Common Patterns.......................................................................................................................................20
4.1. Executing a user script on a domain and all its subdomains........................................................................204.2. Testing whether a Greasemonkey function is available..............................................................................214.3. Testing whether a page includes an HTML element...................................................................................224.4. Doing something for every HTML element................................................................................................234.5. Doing something for every instance of a specific HTML element..............................................................244.6. Doing something for every element with a certain attribute........................................................................254.7. Inserting content before an element.............................................................................................................284.8. Inserting content after an element................................................................................................................294.9. Removing an element..................................................................................................................................304.10. Replacing an element withnew content....................................................................................................314.11. Inserting complex HTML quickly.............................................................................................................324.12. Adding images without hitting a central server.........................................................................................334.13. Adding CSS styles.....................................................................................................................................344.14. Getting an element's style..........................................................................................................................354.15. Setting an element's style...........................................................................................................................364.16. Post−processing a pageafter it renders......................................................................................................374.17. Matching case−insensitiveattribute values...............................................................................................384.18. Getting the current domain name...............................................................................................................394.19. Rewriting links...........................................................................................................................................404.20. Redirecting pages.......................................................................................................................................414.21. Intercepting user clicks..............................................................................................................................424.22. Overriding a built−in Javascript method....................................................................................................434.23. Parsing XML..............................................................................................................................................44
Chapter 5. Case Studies.................................................................................................................................................46
5.1. Case study: GMail Secure............................................................................................................................465.2. Case study: Bloglines Autoload...................................................................................................................475.3. Case study: Ain't It Readable.......................................................................................................................48
Dive Into Greasemonkeyi
 
Table of Contents
Chapter 5. Case Studies
5.4. Case study: Offsite Blank............................................................................................................................505.5. Case study: Dumb Quotes............................................................................................................................525.6. Case study: Frownies...................................................................................................................................555.7. Case study: Zoom Textarea.........................................................................................................................585.8. Case study: Access Bar................................................................................................................................64
Chapter 6. Advanced Topics.........................................................................................................................................70
6.1. Storing and retrieving persistent data..........................................................................................................706.2. Adding items to the menubar.......................................................................................................................716.3. Integrating data from othersites..................................................................................................................726.4. Compiling your user script into an extension..............................................................................................73
GreasemonkeyAPI Reference......................................................................................................................................75
Name...................................................................................................................................................................75Synopsis..............................................................................................................................................................75Description..........................................................................................................................................................75History.................................................................................................................................................................75Name...................................................................................................................................................................75Synopsis..............................................................................................................................................................75Description..........................................................................................................................................................75History.................................................................................................................................................................76Name...................................................................................................................................................................76Synopsis..............................................................................................................................................................76Description..........................................................................................................................................................76History.................................................................................................................................................................76Name...................................................................................................................................................................76Synopsis..............................................................................................................................................................77Description..........................................................................................................................................................77Bugs....................................................................................................................................................................77History.................................................................................................................................................................77Name...................................................................................................................................................................77Synopsis..............................................................................................................................................................77Description..........................................................................................................................................................77Examples.............................................................................................................................................................79Bugs....................................................................................................................................................................80Notes...................................................................................................................................................................80History.................................................................................................................................................................80
List of "further reading" links.....................................................................................................................................81List of tips.......................................................................................................................................................................83List of examples..............................................................................................................................................................84List of procedures...........................................................................................................................................................86Revision history..............................................................................................................................................................87
Dive Into Greasemonkeyii

Activity (45)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
noskibat liked this
kacem2013 liked this
Aaditya Vadnere liked this
fla4m liked this
Gaurav Gond liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->