How to Install Userscripts

On this page: Greasemonkey, GreaseKit, Opera, Chrome, Midori, IE7Pro

Userscripts are small pieces of javascript that modify webpages to do things they were not originally intended to do.

Some installation methods or add-ons apply to more than one web browser, so choose the method that applies to your browser from this list: You should be aware that just because all of these browsers can run userscripts does not mean that all scripts will run in all of these browsers. Some scripts may make use of features found only in a specific browser or browser plugin.

Greasemonkey

Greasemonkey is an extension that adds userscript capabilities to Firefox, Flock, Songbird and several other browsers based on Mozilla's Gecko.

Once Greasemonkey is installed (and enabled), clicking on links to userscripts will cause an installation window to pop up and all you need to do is click "Install".

If you already have the userscript saved on your hard drive, then once you have installed Greasemonkey you can drag the userscript into your browser window and the installation window will appear.

A large number of Greasemonkey-compatible scripts are available at userscripts.org.

GreaseKit

GreaseKit is a SIMBL plugin that adds userscript capabilities to Safari and other applications based on WebKit.

The GreaseKit homepage has a download link as well as installation instructions.

Opera

Opera has built-in support for "user JavaScripts" since version 8, and can even run some Greasemonkey scripts (but you must make sure Greasemonkey scripts have the extension ".user.js"). There are two ways to set up Opera for userscripts depending on whether the scripts are meant to run on all web sites, or just on some web sites.

Userscripts That Run on All Web Sites

Go to Tools > Preferences > Advanced > Content > JavaScript options and you will see a field for setting the location of userscripts. Once you set this location, Opera will run any scripts you put in that folder whenever it loads a web page regardless of which web site you are viewing.

Userscripts That Run on Specific Web Sites

Go to the web site and right click anywhere on the page. Go to Edit Site Preferences > Scripting and you will see a field for setting the location of userscripts. Opera will now run any scripts you put in that folder whenever you load a page from that web site.

For more information you can check out Opera's page on using user JavaScript.

Chrome

Google's Chrome (and the open-source Chromium on which it is based) has built in support for userscripts, but only in recent releases. There is no proper interface for managing the scripts - to install scripts you must copy them to the "User Scripts" sub-folder inside your user data directory. Your user data directory varies by browser and operating system as follows:

If you are using Google Chrome:
Windows XP:
%userprofile%\Local Settings\Application Data\Google\Chrome\User Data\Default
Windows Vista:
%userprofile%\AppData\Local\Google\Chrome\User Data\Default
Mac OS X:
~/Library/Application Support/Google/Chrome/Default
Linux:
~/.config/google-chrome/Default
If you are using Chromium:
Windows XP:
%userprofile%\Local Settings\Application Data\Chromium\User Data\Default
Windows Vista:
%userprofile%\AppData\Local\Chromium\User Data\Default
Mac OS X:
~/Library/Application Support/Chromium/Default
Linux:
~/.config/chromium/Default
You must then launch the browser with --enable-user-scripts as an argument. The simplest way to do this is to modify the shortcut you use to start the browser by right-clicking on the shortcut and selecting properties, then adding --enable-user-scripts to the end of the "Target" or "Command" field.

Tips:
  • The script file names must end with .user.js or they will be ignored.
  • If there is no "User Scripts" folder in the user data directory suggested above, then you should create it.
  • %userprofile% usually translates to the following:
    • On Windows XP: C:\Documents and Settings\<username>
    • On Windows Vista: C:\Users\<username>
More detailed information about userscript support can be found in Chromium's documentation.

Midori

Midori has had built-in support for userscripts since version 0.0.18, but you should make sure you are using the latest version to get the best results. Midori can understand the basic syntax of Greasemonkey scripts but it does not yet implement the functions provided by Greasemonkey that many Greasemonkey scripts depend on. As a result, some of these scripts will work while others won't.

Midori has a basic interface for managing userscripts, but this interface does not yet allow installation. You can install scripts by simply copying them to ~/.local/share/midori/scripts and making sure they have a ".js" extension (".user.js" also works). Scripts should be detected immediately and there is no need to restart Midori.

Once you have scripts installed you can enable or disable them from the sidepanel by going to Tools > Userscripts and clicking on the green and red circles.

IE7Pro

IE7Pro is an add-on for Microsoft Internet Explorer (versions 6, 7 and 8) that extends and enhances the browser in many ways, including the ability to run userscripts.

After downloading IE7Pro, run the installer with all the default options ("Enable Userscripts Plugins" should be checked). When the installer completes it will open Internet Explorer for you.

IE7Pro comes with several userscripts pre-installed but disabled by default. To enable or disable the scripts you need to go to Tools > IE7Pro Preferences and then click on "User Scripts" in the left-hand menu. You will see a list of all the installed userscripts with checkboxes for enabling them.

To add a new script you need to copy it to the "userscripts" subfolder of the IE7Pro installation folder. If you left all the settings with their default values while installing, then you should copy the script to C:\Program Files\IEPro\userscripts. Once you have copied the file there, go back to the userscripts section of IE7Pro's preferences, click "Reload All Scripts" and then check the box next to the script you just installed. Scripts must have an "ieuser.js" extension to work.

The IE7Pro website has a video tutorial on userscripts and a large number of compatible scripts can be found at iescripts.org.