[Greasemonkey] GM-TNG - several bugs fixed

Thom Wetzel thomw at lmnopc.com
Wed Jul 27 14:44:52 EDT 2005


I just wanted to say that there are some times when window.foo = 
function() { ... } is extremely useful.
Shacknews.com is a gaming site that I spend entirely too much time on 
(and creating Greasemonkey scripts to modify) and they never got around 
to fixing a bunch of stupid little things for Firefox.  Using window.foo 
= function() {} I've fixed a bunch of these little annoyances and made 
some pretty nifty Greasemonkey scripts to fix them.

It's really preferable over replacing the onclick attribute, because I 
can change the behavior of literally hundreds of objects with one call 
instead of replacing each one seperately.

Thom



Aaron Boodman wrote:

>* Incompatibility with HTML Validator (James)
>* Read/write ness of propreties of global window (specifically location) (Lenny)
>* JS error in file association warning (Mark)
>
>As for the gmail delete script, it works fine for me in 1.0.x. In 1.1
>it fails due to this:
>
>window.foo = function() {
>...
>}
>
>button.setAttribute("onclick", "window.foo()")
>
>This has been mentioned tons of times, but you shouldn't do this. It's
>bad style, it unecessarily polutes the window's namespace, and now,
>it's no longer supported in Deer Park.
>
>The correct way is:
>
>function foo() {
>...
>}
>
>button.onclick = foo;
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Greasemonkey mailing list
>Greasemonkey at mozdev.org
>http://mozdev.org/mailman/listinfo/greasemonkey
>  
>


More information about the Greasemonkey mailing list