Hi all,
Right now I'm dealing with a similar problem with my otherwise working
script for Rally.  I routinely see up to three copies of the script running
simultaneously.

I use waitForKeyElements() to trigger on the particular Rally page I want
to work on.

So, as per the previous suggestion in this thread, I added the following
wrapper to my script:

if (unsafeWindow.monkeyRunning === undefined) {
>     unsafeWindow.monkeyRunning = "running";

        <the rest of my script>

}


This doesn't work at all.  As each script is triggered, the variable
unsafeWindow.monkeyRunning *always* starts out undefined.  Which probably
means I did something wrong here, but I'm not sure what else I should be
doing.

Just checked, now I have 4 copies of the script running.

As before, it is hard to provide a publicly available test site for this
problem, because Rally subscriptions are private.  I can try again if
needed.

- Neil

On Wed, May 30, 2012 at 9:29 AM, Anthony Lieuallen <[email protected]>wrote:

> On Tue, May 29, 2012 at 11:51 PM, Matt Kruse <[email protected]>wrote:
>
>> I tried to create a simplified test case here:
>> http://socialfixer.com/temp/pushstate.html
>>
>> And, the problem does not exhibit itself. So calling pushState by
>> itself is not enough. There is more going on. I'm going to dig in
>> further and see if I can figure out exactly what is triggering the GM
>> script to be re-executed.
>>
>
> Ultimately, we're looking for whatever causes onLocationChange to be
> called:
>
> https://github.com/greasemonkey/greasemonkey/blob/master/content/browser.js#L29
>
>
> https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIWebProgressListener#onLocationChange%28%29
>
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to