Getting Started ⬌ Installing Scripts ⬌ Managing Scripts ⬌ Monkey Menu ⬌ Creating Scripts ⬌ Environment ⬌ Other Useful Tools ⬌ API
The purpose of Greasemonkey is to manage user scripts. User scripts allow the user to control the way one uses the web, by customizing it with scripting. The Greasemonkey on AMO and the Greasemonkey on SourceForge extension won't do any good without any scripts installed.
The first thing an eager user should do is find and install (or write!) a useful script.
Installation of a script is most often done by clicking a link on a web page. One may also drag-and-drop a local file into the browser window, or optionally use the menu bar File → Open File… dialog to open it.
.user.js
is a valid Greasemonkey user script. .user.js
, Greasemonkey will intercept the loading file by presenting the installation dialog. When navigating to a User script, Greasemonkey will open its installation dialog instead of loading the script like a normal page.
The interface displays the name and description of the script, if available, as well as the Script injection rules that apply.
This button will, of course, install the script in question.
Like the Firefox extension installation dialog, this button is disabled for a few seconds to avoid the same potential security vulnerability. With a more recent commit the about:config?filter=extensions.greasemonkey.installDelay preference may be changed to decrease the time waiting.
This button will cancel the installation of a script.
This button will allow viewing of the source code contained in the script. At this point, Greasemonkey has already downloaded the User script in question to display the name and other details.
When a user shows the script source, it displays the temporary file that Greasemonkey has already downloaded depicted in this. This is intentionally engineered to avoid a potential security problem. An evil server could deliver one innocent script for viewing, and on the second load an evil script for installing. This approach ensures that the script is downloaded only once. Upon examination of the visible script source, this copy is the script that will be installed.
Finally, in this window there is an information bar at the top similar to the Firefox extension installation security warning. This bar includes another Install button much like the the prior dialog. Clicking this button will also install the script.
Getting Started ⬌ Installing Scripts ⬌ Managing Scripts ⬌ Monkey Menu ⬌ Creating Scripts ⬌ Environment ⬌ Other Useful Tools ⬌ API
Wiki: Greasemonkey_Manual:API
Wiki: Greasemonkey_Manual:Creating_Scripts
Wiki: Greasemonkey_Manual:Environment
Wiki: Greasemonkey_Manual:Getting_Started
Wiki: Greasemonkey_Manual:Managing_Scripts
Wiki: Greasemonkey_Manual:Monkey_Menu
Wiki: Greasemonkey_Manual:Other_Useful_Tools
Wiki: Script_injection_rules
Wiki: User_script