Difference between revisions of "Greasemonkey Manual:Monkey Menu"

From GreaseSpot Wiki
Jump to navigationJump to search
(Partial refactoring of this page)
Line 1: Line 1:
 +
__NOTOC__
 
{{Greasemonkey Manual TOC}}
 
{{Greasemonkey Manual TOC}}
  
Line 9: Line 10:
 
== The Menu ==
 
== The Menu ==
  
[[Image:Monkey-menu.png|frame|Greasemonkey's "Monkey Menu"]]
+
[[Image:Monkey-menu.png|left|frame|GM "Monkey Menu"]]
  
 
Later versions of [[Greasemonkey]] added a menu to this, and it was dubbed the monkey menu.
 
Later versions of [[Greasemonkey]] added a menu to this, and it was dubbed the monkey menu.
Line 24: Line 25:
  
 
=== User Script Commands ===
 
=== User Script Commands ===
The <code>User Script Commands...</code> sub-menu lists the menu items for individual scripts which have been added via the [[GM_registerMenuCommand]] [[API]]. The presence and/or contents (as well as the possible actions) of this sub-menu depend completely on which scripts you have installed.
+
The <code>User Script Commands...</code> sub-menu lists the menu items for individual scripts which have been added via the [[GM_registerMenuCommand]] [[API]]. The presence and/or contents (as well as the possible actions) of this sub-menu depend completely on which scripts have been installed.
 
It is common for this sub-menu to be unavailable and greyed out.
 
It is common for this sub-menu to be unavailable and greyed out.
  
Line 30: Line 31:
  
 
There are a few other "hidden" shortcuts in the monkey menu.
 
There are a few other "hidden" shortcuts in the monkey menu.
First, a middle-click (your scroll wheel usually functions as a middle button, if your mouse has one) on the monkey icon will open the [[Greasemonkey Manual:Manage Dialog|manage dialog]].
+
First, a middle-click (the scroll wheel usually functions as a middle button, if the mouse has one) on the monkey icon will open the [[Greasemonkey Manual:Manage Dialog|manage dialog]].
Second, a right-click on a script in the list will fire up your editor (see the edit button above) on the script that you clicked on.
+
Second, a right-click on a script in the list will fire up the text editor (see the edit button above) on the script that is clicked.
  
These shortcuts (especially the latter) are designed for advanced users.
+
These shortcuts (especially the latter) are designed for advanced users. However they can be very handy!
However, if you can remember them, and have a need for them, they can be very handy!
 
  
 
== No Scripts Installed ==
 
== No Scripts Installed ==

Revision as of 02:21, 8 April 2009

Book.png
Greasemonkey Manual
Using Greasemonkey
Installing Scripts
Monkey Menu
Getting Help
User Script Authoring
Editing
Environment
API

The Monkey

Early versions of Greasemonkey provided an image of a monkey in the status bar. Clicking on the monkey would toggle the global enabled status of Greasemonkey. When enabled, the monkey is displayed in color; when disabled, it is greyed out, and no user scripts will run.

The Menu

GM "Monkey Menu"

Later versions of Greasemonkey added a menu to this, and it was dubbed the monkey menu. This menu largely mirrors that menu which is available under the Tools menu.

The Manage User Scripts... menu item will open the manage dialog as described earlier. The New User Script... menu item is used to write a new user script, from scratch. It is described in more detail in the editing section of this manual.

This menu provides a list of the scripts whose include and exclude rules match the current page. Each script listed here functions as a checkbox control, and the scripts can be individually enabled or disabled by clicking on them here.

The monkey menu also adds a menu item to explicitly display, as well as control, the global enabled status.

User Script Commands

The User Script Commands... sub-menu lists the menu items for individual scripts which have been added via the GM_registerMenuCommand API. The presence and/or contents (as well as the possible actions) of this sub-menu depend completely on which scripts have been installed. It is common for this sub-menu to be unavailable and greyed out.

Shortcuts

There are a few other "hidden" shortcuts in the monkey menu. First, a middle-click (the scroll wheel usually functions as a middle button, if the mouse has one) on the monkey icon will open the manage dialog. Second, a right-click on a script in the list will fire up the text editor (see the edit button above) on the script that is clicked.

These shortcuts (especially the latter) are designed for advanced users. However they can be very handy!

No Scripts Installed

It's possible for the monkey menu to show "No Scripts Installed!" even when there are scripts installed. This is an issue of semantics. The monkey menu displays only scripts that run on the currently visible tab, and this message is shown when no scripts match that criteria.