[Greasemonkey] Script firing twice?
Dave Land
land at aol.com
Sat Jan 7 21:58:09 EST 2006
On Jan 7, 2006, at 6:57 PM, Jeremy Dunck wrote:
> On 1/7/06, Dave Land <land at aol.com> wrote:
>> Oddly, I get two logged events, about 120 milliseconds apart from the
>> following script:
>>
>> // ==UserScript==
>> // @namespace http://www.ryanland.com/greasemonkey
>> // @name How Lucky?
>> // @include *.google.tld/*
> ...
>> Why does it fire twice?
>
> I only see it once.
Hmm. I see it twice every time.
Oh, and it's more like 650-700 ms apart, by the way, not 120 -- I was
foolishly using now.getMilliseconds, rather than now.getTime, to try
to calculate the time between the two firings.
In fact, the only reason I was timing it was to see if maybe it was a
problem with my error console, rather than the script actually firing
twice, but the script is definitely firing twice. I changed it so
that it writes the result of now.getTime into the scriptvals each
time. The next time it fires, It reads it back and calculates the
time elapsed since the last firing in milliseconds.
> What URL were you visiting?
http://www.google.com/search?q=<query terms>
> Are you sure you don't have two copies of the same script installed?
Quite.
And I should probably have specified: 1.5 with 0.6.4, too.
Dave
More information about the Greasemonkey
mailing list