GM.setValue

From GreaseSpot Wiki
Revision as of 01:52, 23 September 2007 by Tom (talk | contribs) (about:config)
Jump to navigationJump to search

Template:Underscore

Syntax

GM_setValue( name, value )

Description

Allows user script authors to persist simple values locally. Strings, booleans, and integers are the only allowed data types.

Values are stored in the Firefox preferences back end and can be changed by typing about:config in the address bar and searching for the preference name "greasemonkey.scriptval.script-namespace/script-name. This places limitations on the size of an individual value, and the number of values. (This statement may not be accurate. Please see this mailing list thread for details.)

Examples

alert(GM_setValue("foo", "bar"));

See also