@@ -31,7 +31,7 @@ declare const GM_info: {
3131 userConfig?: UserConfig;
3232 userConfigStr?: string;
3333 // isIncognito: boolean;
34- // downloadMode: " native" | " disabled" | " browser" ;
34+ downloadMode: " native " ; // " native" | " disabled" | " browser" ;
3535 script: {
3636 author?: string;
3737 description?: string;
@@ -425,7 +425,7 @@ declare namespace GMTypes {
425425
426426 interface DownloadDetails {
427427 method?: " GET" | " POST" ;
428- downloadMethod ?: " xhr " | " browser" ;
428+ downloadMode ?: " native " | " browser" ;
429429 url: string;
430430 name: string;
431431 headers?: { [key: string]: string } ;
@@ -444,8 +444,24 @@ declare namespace GMTypes {
444444 id: string;
445445 }
446446
447- type NotificationOnClick = (this: NotificationThis, id: string, index?: number) => unknown;
448- type NotificationOnDone = (this: NotificationThis, user: boolean) => unknown;
447+ type NotificationOnClickEvent = {
448+ event: " click" | " buttonClick" ;
449+ id: string;
450+ isButtonClick: boolean;
451+ buttonClickIndex: number | undefined;
452+ byUser: boolean | undefined;
453+ preventDefault: () => void;
454+ highlight: NotificationDetails[" highlight" ];
455+ image: NotificationDetails[" image" ];
456+ silent: NotificationDetails[" silent" ];
457+ tag: NotificationDetails[" tag" ];
458+ text: NotificationDetails[" tag" ];
459+ timeout: NotificationDetails[" timeout" ];
460+ title: NotificationDetails[" title" ];
461+ url: NotificationDetails[" url" ];
462+ } ;
463+ type NotificationOnClick = (this: NotificationThis, event: NotificationOnClickEvent) => unknown;
464+ type NotificationOnDone = (this: NotificationThis, user?: boolean) => unknown;
449465
450466 interface NotificationButton {
451467 title: string;
@@ -455,10 +471,12 @@ declare namespace GMTypes {
455471 interface NotificationDetails {
456472 text?: string;
457473 title?: string;
474+ tag?: string;
458475 image?: string;
459476 highlight?: boolean;
460477 silent?: boolean;
461478 timeout?: number;
479+ url?: string;
462480 onclick?: NotificationOnClick;
463481 ondone?: NotificationOnDone;
464482 progress?: number;
0 commit comments