GM.listValues: Difference between revisions
From GreaseSpot Wiki
Jump to navigationJump to search
m (Whenver 8.1ish is released, this function is available currently in the trunk... created core structure doc... more explicit example could be modified and eventual link in with core API when released) |
(Update for 4.0) |
||
(26 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{DISPLAYTITLE:GM_listValues}} | ||
== Description == | == Description == | ||
This | This method retrieves an array of preference names that this script has stored. | ||
See [[GM_setValue]] for details on the storage of these values. | |||
== Syntax == | |||
{{Function|GM.listValues|}} | |||
Compatibility: [[Version_history#4.0_2|Greasemonkey 4.0+]] | |||
=== Arguments === | |||
None. | |||
=== Returns === | |||
[[ | A [[Promise]], rejected in case of error and otherwise resolved with an <code>Array</code> of <code>String</code>s for previously set values. | ||
== Examples == | == Examples == | ||
<pre class='sample'> | |||
console.log(await GM.listValues()); | |||
</pre> | |||
== See Also == | == See Also == | ||
* [[GM.getValue]] | |||
* [[GM.setValue]] | |||
* [[GM.deleteValue]] | |||
[[Category:API_Reference|L]] | [[Category:API_Reference|L]] |
Revision as of 14:29, 3 November 2017
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.
Syntax
function GM.listValues( )
Compatibility: Greasemonkey 4.0+
Arguments
None.
Returns
A Promise, rejected in case of error and otherwise resolved with an Array
of String
s for previously set values.
Examples
console.log(await GM.listValues());