[Greasemonkey] Choosing the right script

Eric Darchis edarchis at gmail.com
Wed Apr 20 01:33:53 EDT 2005

On 4/19/05, Matthias Bauer <ml-greasemonkey-42imk83y at moeffju.net> wrote:
> Couldn't you just change top.frames?
> top._frames = top.frames;
> top.frames = new Array('foo');
> Ta-da, script doesn't run any more. Try?

That's a good idea. Indeed, one can change the top.frames.

However, the problem persists because the user script is not run. It only 
gets run on the redirected page !

I did a test this way:
first.html with a script doing alert("first"); location.replace=
second.html contains alert("second");
and a userscript doing alert("userscript");
I get "second" then "userscript"
Nothing run on first.html :-(

Any thought ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050420/260ef11f/attachment.htm

More information about the Greasemonkey mailing list