[Greasemonkey] Storing large integers with GM_setValue overflows?

Matthias Bauer ml-greasemonkey-42imk83y at moeffju.net
Wed Jun 29 20:50:11 EDT 2005


On 29.06.2005 19:23 Aaron Boodman wrote:

> GM_setValue("foo", new Date().getTime()) ?

var now = new Date().getTime();
GM_setValue('bar', now);

Same difference.

> Yeah, I would image that should definitely work. If it isn't perhaps
> some underlying limitation on the XPCOM preferences object (which
> would suck).

It's stored as integer. app.update.lastUpdateDate is set to 1119994042
(integer), so it probably is not an XPCOM limitation.

> File a bug please, and as a workaround:
> 
> GM_setValue("foo", new Date().getTime() + "");
> parseInt(GM_getValue("foo", 0));

Will do.


-Matt


More information about the Greasemonkey mailing list