GM.notification

From GreaseSpot Wiki
Revision as of 16:25, 18 April 2018 by Arantius (talk | contribs) (Created page with "== Description == This method opens the specified URL in a new tab. == Syntax == {{Function|GM.notification|text, title, image, onclick}} Compatibility: Version_history#...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

This method opens the specified URL in a new tab.

Syntax

function GM.notification( text, title, image, onclick )

Compatibility: Greasemonkey 4.0+

Arguments

text
String The main notification text.
title
String The title of the notification.
image
String Optional: The URL for an image to display in the dialog. If not provided, the Greasemonkey logo by default.
onclick
Function Optional: callback, triggered when the notification's button is clicked.

Returns

undefined

Examples

GM.notification("A new widget is available at the frobber.", "New widget!");

The appearance is platform specific, but could be for example: