GM.listValues: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
(simplify)
m (move compatibility to description section)
Line 5: Line 5:
This method retrieves an array of preference names that this script has stored.
This method retrieves an array of preference names that this script has stored.
See [[GM_setValue]] for details on the storage of these values.
See [[GM_setValue]] for details on the storage of these values.
Compatibility: [[Version_history#0.8.20090123.1|Greasemonkey 0.8.1+]]


== Syntax ==
== Syntax ==


{{Function|GM_listValues|}}
{{Function|GM_listValues|}}
Compatibility: [[Version_history#0.8.20090123.1|Greasemonkey 0.8.1+]]


== Arguments ==
== Arguments ==

Revision as of 21:30, 8 February 2010


Description

This method retrieves an array of preference names that this script has stored. See GM_setValue for details on the storage of these values.

Compatibility: Greasemonkey 0.8.1+

Syntax

function GM_listValues( )

Arguments

None.

Returns

Array of Strings

Examples

GM_log(GM_listValues());

An array of all values used by a script:

var vals = [];
for each (var val in GM_listValues()) {
  vals.push(GM_getValue(val));
}

See Also