[Greasemonkey] storing arrays with GM_setValue
Jeremy Dunck
jdunck at gmail.com
Sat Jun 4 02:13:08 EDT 2005
On 6/4/05, chris feldmann <cfeldmann at gmail.com> wrote:
> No matter how I try to serialize an array through GM_setValue, I get an
> error: (roughly) "Attempt to set a preference with variable type: Object."
Can you make assumptions about the contents of your array?
If so:
["test", "me"].join(",")
If not, maybe:
var a = ["test", "me"];
GM_setValue("anarray", uneval(a));
var b = eval(GM_getValue("anarray");
No?
More information about the Greasemonkey
mailing list