GM.getValue: Difference between revisions
From GreaseSpot Wiki
Jump to navigationJump to search
Line 1: | Line 1: | ||
{{DISPLAYTITLE:GM_getValue}} | {{DISPLAYTITLE:GM_getValue}} | ||
PENISSSSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
This method retrieves a value that was set with [[GM_setValue]]. | This method retrieves a value that was set with [[GM_setValue]]. |
Revision as of 08:27, 14 March 2011
PENISSSSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This method retrieves a value that was set with GM_setValue. See GM_setValue for details on the storage of these values.
Compatibility: Greasemonkey 0.3b+
Syntax
function GM_getValue( name, default )
Arguments
name
String
The property name to get. See GM_setValue for details.default
- Optional. Any value to be returned, when no value has previously been set.
Returns
- When this
name
has been set String
,Integer
orBoolean
as previously set- When this
name
has not been set, anddefault
is provided - The value passed as
default
- When this
name
has not been set, anddefault
is not provided undefined
Examples
GM_log(GM_getValue("foo"));