A greasemonkey is a mechanic who works on your automobile. He gets
his hands dirty, and goes under the hood to find out why your car is
making that clunking noise. Greasemonkey is an extension for Firefox
that does much the same thing, but without the ridiculous fees.
This guide is intended for beginners
In my previous guide I explained how to install a Firefox extension, and hopefully sparked some interest in why you would want to extend your web browser in the first place. I used the Greasemonkey extension as an example for a very good reason. Sometimes you want to extend your web browser in a big way, like putting a new room in your house. That's where an extension comes in (it's like hiring a construction company). Other times all you want to do is repaint a room or re-hang a door; something you could do yourself over a weekend. That's where Greasemonkey comes in. There are many small jobs and minor tweaks to web pages that would be overkill for a full Firefox extension.
Greasemonkey is a unique extension in that it lets you install these things called user scripts. User scripts are much smaller than extensions, and are often targeted to much more specific tasks than extensions. There is a web site called UserScripts.org that is devoted to these small tiny hacks people have created to make the web work more like the way they want it to.
It can be complicated to create your own user scripts (it requires understanding the Javascript programming language), but it is dead simple to install and use scripts other people have created. And let me tell you that a *lot* of people have created scripts. There are over 7500 user scripts on UserScripts.org. If something on a web page has annoyed you, there is undoubtedly a user script that fixes it.
What Can Greasemonkey User Scripts Do?Because user scripts use the Javascript programming language there is really almost anything that they can do. Or at least, that would be the case if they weren't restricted. One of the nice things about Greasemonkey user scripts is that they're restricted in ways that regular Firefox extensions aren't. User scripts won't change your Firefox toolbars, add things to your right click menu options, look at files on your computer or rub your cat's hair the wrong way.
Useful Greasemonkey User ScriptsGreasemonkey installs like any other Firefox extension. This guide shows you how to install Greasemonkey in a step by step process with screenshots.
How to Find Greasemonkey User Scripts
The best source for finding Greasemonkey scripts is userscripts.org. To find scripts for a specific web site, type its name into the search box and hit enter.
The left hand side of the screen will return a list of scripts. Unfortunately there is no way to sort them.
If you click on the script name it will take you to a page with more information about the scripts. The easiest way to tell if a script is any good is by the number of times it has been installed, and how much effort the author goes into explaining what the script does and how it works.
To install a script click on the "install this script" link in the right hand column.
Hot Tip: I've created a script that highlights the most popular user scripts and makes it easier to find the best scripts on userscripts.org.
Lifehacker.com and Lifehack.org both often feature Greasemonkey user scripts.
Installing a ScriptAll user scripts end with the .user.js extension. If you do not have Greasemonkey installed, or Greasemonkey is disabled, then your web browser will try to download the file instead of installing it.
Click on this link to start installation of my Akismet Auntie Spam script.
A box will pop-up that gives a short description, tells you which web sites the script runs on, and offer to install it. Click on the Install button.
A message will appear temporarily in the lower right hand corner of your web browser telling you that the installation was successful.
You can enable and disable Greasemonkey temporarily by clicking on the little monkey icon in the lower right corner of your web browser. This is a great trick for when a script isn't doing exactly what you want - you can turn off all of your scripts and interact with the web site normally as if you didn't have Greasemonkey installed.
If you click on Tools >> Greasemonkey >> Manage User Scripts it will open up a windows that lets you:
Heading to the management panel is a really useful way to further tweak scripts, or just change the web sites they run on.
Advanced Users - Configuring ScriptsI can't tell you how to configure a specific script, but I can give you a general overview of the various ways it can be done.
Editing the ScriptExample: Find images that are too wide
This is the sign of a lazy programmer. It isn't that hard to edit a script, but it is still a pain in the butt when they tell you to change settings directly in the script. I usually won't bother installing scripts like this.
Example: Pagerization
User scripts can only modify the Firefox menu in one place, under Tools >> Greasemonkey >> User Script Commands. It may be grayed out if you don't have any scripts installed that register commands.
Example: Facebook photo album keyboard navigation
Some scripts use hot keys to perform actions. You'll have to read their documentation on how to use them. When you're on the web page that the script works with, hitting keys on your keyboard will cause the script to do things.
Changing Settings InteractivelyExample: Pre Fill Comments
Smart scripts configure themselves through dialog boxes the first time you run them. This is by far the recommended and most painless way for scripts to configure themselves. Hint.
Stylish is a very similar extension that lets you apply user styles (not scripts to web pages). Stylish is to CSS as Greasemonkey is to Javascript. It lets you change the CSS of any web site to improve the way it looks, or get rid of annoyances. Greasemonkey user scripts will let you do more than Stylish, but if all you want to do is change the appearance of something then Stylish is the right tool for you. You can find styles that other people have created at UserStyles.org.
Q2: I want to create a Greasemonkey script, but I don't know how to program.Platypus is WYSIWYG editor for Greasemonkey scripts. It will let you create Greasemonkey scripts by moving around and interacting with parts of a web site.
(WYSIWYG - what you see is what you get)
Q3: What about Internet Explorer?Yes Virginia, it is possible to use some userscripts with Internet Explorer. Watch this space.
Source: Iinternetducttape.com
Photo credit Rosenblumtv.wordpress.com
Recent comments
2 years 38 weeks ago
2 years 38 weeks ago
3 years 3 weeks ago
3 years 5 weeks ago
3 years 26 weeks ago
3 years 32 weeks ago
3 years 34 weeks ago
3 years 37 weeks ago
3 years 37 weeks ago
3 years 41 weeks ago