<http://wiki.greasespot.net/Prevent_Execution_in_Frames>

Thanks, that was exactly what i am looking for.

On 14 Mai, 16:57, Kwah <[email protected]> wrote:
> Have you checked whether the page you are loading uses frames or
> iframes ('embedded sites')?
>
> If it does, what you see as one page-load may actually be 2 or more
> documents loading on the same page. In other words, your script is
> most likely running multiple times due to there being more than one
> frame on the page that matches your @include and @exclude rules.
>
> Some details are now available on the Greasepot wiki 
> <http://wiki.greasespot.net/Prevent_Execution_in_Frames> (nb: subject
> to change) which gives an example of how to stop your script doing
> this (by comparing window.top and window.self).
>
> Regards
>
> On 14 May 2011 14:53, Nico Gerwien <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > i wrote a small HelloWorld Script with Greasymonkey and did something
> > like this:
> > ...
> > alert(jQuery);
> > alert(jQuery().jquery);
>
> > So the problem is Greasemonkey executes my userscript on some sites
> > more than once. In this case i get the alert messages many times.
>
> > I would like to know if there is a way to ensure that a userscript is
> > only executed once per website. Or maybe prevent the script to execute
> > on embedded sites.
>
> > Greetz.
>
> > --
> > 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 
> > athttp://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