GM_setValue

supahgreg edited this page May 29, 2011 · 5 revisions

Description

GM_setValue sets a stored user script preference.

Arguments

String name

The name of the preference to create.

String Boolean Integer value

The data to be associated with the preference.

Returns (new in Scriptish!)

String Boolean Integer value

The unmodified value passed to GM_setValue.

Examples

GM_log("Is this script current? " + GM_setValue("isCurrent", true));

OR

GM_setValue("isCurrent", true);
GM_log("Is this script current? " + GM_getValue("isCurrent", false));