UserScript Writing 101
A Short Piece about me/this
I've been a Greasemonkey for about a year now: meaning that this is quite easy to learn. I wrote this because learning Greasemonkey entails things other than the bullshit located at Dive Into Greasemonkey. Honestly, that site isn't helpful at all. Miserable, really. Read on.
Introduction
So you want to learn Greasemonkey? Excellent! This short guide (should) help you to be well on your way to being a scriptwriter. Just because I've sectioned off parts doesn't mean you should skip; read everything (it isn't that much)!
Background
What is Greasemonkey? Greasemonkey is an add-on for Mozilla Firefox. In short, it uses JavaScript to enhance or change the way you interact with the web. This, of course, means A LOT of things are possible.
What Can't Greasemonkey Do?
Greasemonkey is used for many incredibly complex things. At userscripts.org, we've seen scripts that have solved captcha's, interact with and hack Adobe Flash objects, as well as implement basic high score list exploitation.
But people often mistake Greasemonkey as THE answer to all your dirty hacking fantasies. It is not. For example, frequent requests are made for viewing private MySpace and Facebook profiles. Though this is possible, Greasemonkey doesn't make it ANY easier.
Technical Background
Greasemonkey uses interpreted JavaScript, not to be confused with Sun Microsystem's inferior compiled bytecode language, Java. Therefore, you will not need the JDK or Java Runtime Files for ANY reason whatsoever.
JavaScript is used mainly for maintaining HTML structures by a convention known as Document Object Model (DOM). Wikipedia has a wonderful SVG graphic representing the hierarchy of objects in the DOM.
A bit about standards: all these browsers, all these plugins, and all these different ways to interact with the web. How does it all come together? Web standards (HTTP, HTML, CSS, XML, XPath, SVG, etc.) are maintained by the W3C (World Wide Web Consortium). Although you (or browser developers) aren't required to implement them per se, their conventions are extremely well organized, well thought and agreed upon by many, so if you need to understand it all better, check out their recommendations and drafts for new web technologies.
About JavaScript
JavaScript is probably the sexiest language ever. It is inherently free-form and therefore, awesome. You'll find that it's a lot of fun, and, if you use it long enough, useful outside the realm of web development and Greasemonkey scripting.
As I mentioned in the "Technical Background" section, JavaScript is used for maintaining HTML pages. This will clue you in on the next section, "The Order of Things to Learn". Greasemonkey is sort of like JavaScript on steroids though. It has more "powers". You'll learn about these extra powers as well.
The Order of Things to Learn
Look to the "Resources" section for places to learn about these.- HTML. Hypertext Markup Language. Not the same "language" as JavaScript. This is a markup language, meaning it's a bunch of text that is meant to represent some type of structure, in this case, a web page.
- XML. Extensible Markup Language. In case you didn't realize, HTML itself is a type of "XML". Learning XML is important because many popular websites (YouTube, Facebook, Last.fm) use XML to interact with data. Since you already know HTML by this point, understanding XML should be cake.
- CSS. Cascading Style Sheets. This is the way HTML (should be) stylized. You'll want to learn this.
- JavaScript. Learn all the basics: data types, functions, JavaScript's native functions like prompt, alert, etc.
- The Greasemonkey Extras. Like I said, Greasmonkey == JavaScript, with a lot of extras. A specific page listing the API's can be found here.
Final
That's it. If you have any questions or suggestions concerning the guide, leave a comment here, or send me an email (aavindraa@gmail.com).
Resources
Google. This is your number one resource. In case you haven't noticed yet, you can google most of your questions and come across the answer quickly. Learn it, live it, love it.W3Schools, home of many easy to understand, incredibly useful tutorials.
Mozilla Developer Center (MDC). Here, you can find a lot of API information about Firefox, as well as it's implementation of JavaScript and it's features.
Greasespot, a wiki for learning all about what Greasemonkey has to offer.
W3C. The central source for web standards.

login to vote
heh, javascript is freeform and that's what I love about it too
I don't think Dive Into Greasemonkey's that bad, I mean, when I started learning javascript I did read it :p
login to vote
Just, instead of "Dive Into Greasemonkey" is more correct to look online book
http://commons.oreilly.com/wiki/index.php/Greas...
It seems examples of "Dive Into Greasemonkey" author takes from this book =)
But some even don't work or written for old Greasemonkey.
Although intricate confusing signs on the stage of newcomer might be useful :D
login to vote
Couple things. When you say UserScript Writing 101, and then provide no help in writing scripts and then criticize another site for doing it, it's sad. You don't mention about creating the script or adding them to greasemonkey so I can only hope that you are just adding onto the information located on that site in which case I am fine with it. Second, you call Java an inferior language based on it being a completely different type of code which shows your lack of knowledge of programming and that sort of insults me, however, it may simply be that you are not aware of Java and how it works. For those unaware, JavaScript was made to look like Java, which is why you can get them confused, but they serve totally different purposes.