Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GM_disableMenuCommand

erikvold edited this page · 3 revisions

Description

GM_disableMenuCommand allows a user script to disable an enabled menu item (created with GM_registerMenuCommand) in Scriptish's "User Script Commands" menu.

Note: No menu command is created when the user script is run in a iframe window. User scripts are only allowed to modify their own menu commands.

Arguments

String commandID

The UUID of a menu item created with GM_registerMenuCommand.

Returns

Boolean True if the menu item was disabled. False if a matching menu item was not found.

Examples

function sayHello() { alert("Hello, world!"); }
var menuID = GM_registerMenuCommand("Hello, world (simple)", sayHello);  // adds a menu item
GM_disableMenuCommand(menuID);  // disables a menu item
GM_enableMenuCommand(menuID);  // enables a menu item

Related Pages

Manual: API

Something went wrong with that request. Please try again.