-
Notifications
You must be signed in to change notification settings - Fork 70
GM_enableMenuCommand
supahgreg edited this page May 29, 2011
·
4 revisions
GM_enableMenuCommand
allows a user script to enable a disabled menu item from Scriptish's "User Script Commands" menu, which is created with GM_registerMenuCommand.
Note: No menu command is created when the user script is run in a iframe window.
The UUID of a menu item created with GM_registerMenuCommand.
Boolean
True if the menu item was enabled. False if a matching menu item was not found.
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