From 42c49d4abe55887effefbd0e2753009ba2f65952 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Nov 2023 11:32:49 +0300 Subject: [PATCH] doc: GM_registerMenuCommand id --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0119395..d154600 100644 --- a/index.d.ts +++ b/index.d.ts @@ -223,8 +223,7 @@ declare function GM_openInTab( /** * Registers a command in Violentmonkey popup menu. - * Returns the `caption` parameter in VM2.12.5...VM2.15.8. - * Returns the `id` parameter or a generated random id since VM2.15.9. + * Returns the command's id since VM2.12.5, see description of the `id` parameter. * If you want to add a shortcut, please see `@violentmonkey/shortcut`. */ declare function GM_registerMenuCommand( @@ -234,11 +233,12 @@ declare function GM_registerMenuCommand( onClick: (event: MouseEvent | KeyboardEvent) => void, /** @since VM2.15.9 */ options?: { - /** If not specified, a new random id is generated. */ + /** Default: the `caption` parameter. + * In 2.15.9-2.16.1 the default was a randomly generated string. */ id?: string, /** A hint shown in the status bar when hovering the command. */ title?: string, - /** @default true + /** Default: `true`. * Whether to auto-close the popup after the user invoked the command. */ autoClose?: boolean, }