[Greasemonkey] Re: So, how do I do ... everything?

Andre gm at andrecgn.de
Sat Jul 15 11:04:08 EDT 2006


try
	position = "fixed";
that way FF will float the div in the same position.

I don't understand what you wrote about the setTimeout. It is nowhere in 
your script. If you use that to reposition the div, it is not needed 
with "fixed".

Cheers, Andre

Dave Jacoby wrote:
> So, I'm working on a user script, and as of right now, the goal is to
> make one of
> those annoying boxes that stick in one place no matter how much you
> scroll. I can
> make the thing, I can make the thing pretty and, when I have the code
> so far in a separate
> non-user .js file. In essence, I create a floater with
> createFloater(), and call setFloater in 10 with setTimeout, and that
> re-moves the floater to where I want it. As normal javascript, it
> works. It doesn't even trip anything in the Javascript Console.
> 
> But, but when I run it in a user.js file, it says "setFloater is not
> defined'. That is, until I cut that code to try to make the
> repostioning function an anonymous function, a la DiG, but there was
> something about this kind of construction:
> 
>  setTimeout( ' function () { setTimeout( ' function () { ... } '  ,
> 10 ) ; } '  , 10 ) ;
> 
> It's 2am, I'm a bit tired, and I don't know when to stop! So, there
> must be a better way. The function is at
> http://csociety.org/~jacoby/Code/AI/jcn.user.js , and any comments and
> suggestions would be appreciated. Thank you for your time..
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey



More information about the Greasemonkey mailing list