[Greasemonkey] calling my script from a page
Anthony Lieuallen
arantius at gmail.com
Tue Jun 20 14:44:22 EDT 2006
On 6/20/2006 1:37 PM, s g wrote:
> i figured out how to pass params by:
> param = some-random-str;
> link.addEventListener( "click", function (){ onMasterClick( param ) }, false );
> i set up param to different strings several times for several different links.
> the problem is that now when the function is called - param is always the last one set.
Use scope, to set up closures:
http://en.wikipedia.org/wiki/Closure_(computer_science)
More information about the Greasemonkey
mailing list