|User Script Authoring|
This section of the manual will be short and sweet. As mentioned elsewhere, Greasemonkey provides several methods in its API to enhance the power of user scripts. They are listed here, with a brief description, but each separate method has its own page with more in-depth information, please continue reading there!
- Metadata Block
- Information about the script such as its name or version is encoded into comments by the script author.
- Exposes this information (plus a bit more) to the user script.
- Deletes a value from chrome that was previously set.
- Retrieves stored values, see GM.setValue below.
- Retrieves an array of stored values' keys.
- Permanently stores a value under a key, later available via GM.getValue.
- Provides a URL for loading a
@resource, such as an image, into the page.
- Opens a notification dialog.
- Opens a given URL in a new tab.
- Adds an item to the "User Script Commands" section of the Monkey Menu.
- Sets the contents of the clipboard.
- A variant of XMLHttpRequest, this method allows skipping use the same-origin policy, enabling complex mashups.