The name to show in the popup menu.
Callback function when the command is clicked in the menu.
It receives the event that activated the command (since VM2.13.1) so you can check event.button, event.shiftKey, event.key, and so on.
Optionaloptions: { autoClose?: boolean; icon?: string; id?: string; title?: string }
OptionalautoClose?: booleanDefault: true.
Whether to auto-close the popup after the user invoked the command.
Optionalicon?: stringOptionalid?: stringDefault: the caption parameter.
In 2.15.9-2.16.1 the default was a randomly generated string.
Optionaltitle?: stringA hint shown in the status bar when hovering the command.
Registers a command in Violentmonkey popup menu. Returns the command's id since VM2.12.5, see description of the
idparameter. If you want to add a shortcut, please see@violentmonkey/shortcut.