GM.listValues: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
m (Text replace - "{{Core samp" to "{{Samp")
m (Text replace - "top " to "")
Line 23: Line 23:
|}
|}
:* There are currently no properties.
:* There are currently no properties.
[[#top|top]]


== Examples ==
== Examples ==
Line 30: Line 28:
GM_log(GM_listValues());
GM_log(GM_listValues());
</pre>}}
</pre>}}
[[#top|top]]


An array of values used by a script:
An array of values used by a script:
Line 39: Line 35:
     vals.push(GM_getValue(val));
     vals.push(GM_getValue(val));
</pre>}}
</pre>}}
[[#top|top]]


Equivalent:
Equivalent:
Line 46: Line 40:
var vals = GM_listValues().map(GM_getValue);
var vals = GM_listValues().map(GM_getValue);
</pre>}}
</pre>}}
[[#top|top]]


== See Also ==
== See Also ==
Line 53: Line 45:
* [[GM_setValue]]
* [[GM_setValue]]
* [[GM_deleteValue]]
* [[GM_deleteValue]]
[[#top|top]]


[[Category:API_Reference|L]]
[[Category:API_Reference|L]]

Revision as of 21:28, 3 February 2010


Description

This API method retrieves an array of preference names that start with the branch's root.

Values are retrieved from the Firefox preferences back end and can be manually viewed by typing about:config in the address bar and searching for the preference name "greasemonkey.scriptvals.namespace/name.".

Examples | See Also | Notes

Syntax

GM_listValues()

Value: Function
Returns: String Array
Compatibility: Greasemonkey 0.8.1+
Parameters
Properties
  • There are currently no properties.

Examples

Template:Samp

An array of values used by a script: Template:Good samp

Equivalent: Template:Good samp

See Also