GM_getValue — get script-specific configuration value
returntype GM_getValue(key, defaultValue
GM_getValue retrieves a script-specific configuration value. The return value may be a string, boolean, or integer. The
key argument is a string of no fixed format. The
defaultValue argument is optional; if present, it will be returned if the requested
key does not exist. If no
defaultValue is given and the requested
key does not exist,
GM_getValue will return
Greasemonkey configuration values are similar to browser cookies, but there are important differences. Both are stored on the local machine, but while cookies are domain-specific and can only be accessed from their originating domain, Greasemonkey configuration values are script-specific and can only be accessed by the user script that created them (regardless of the address the user script is currently running on). And unlike cookies, configuration values are never transmitted to remote servers.
GM_getValue was introduced in Greasemonkey 0.3.