GM_enableMenuCommand
supahgreg edited this page May 23, 2011
·
4 revisions
GM_enableMenuCommand
allows a user script to enable a disabled menu item from Scriptish's toolbar button and 'Tools' menu, which is created with GM_registerMenuCommand.
Note: No menu command is provided to the user when the user script is being run on 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.
var menuID = GM_registerMenuCommand("Hello, world (simple)", function() {alert("Hello World!");}); // adds a menu item
GM_disableMenuCommand(menuID); // disables a menu item
GM_enableMenuCommand(menuID); // enables a menu item