[Greasemonkey] Greasemonkey scripts crashing FF when viewing Gmail

Anthony Lieuallen arantius at gmail.com
Tue Apr 4 13:52:01 EDT 2006


On 4/4/2006 11:15 AM, Tom Lee wrote:
> 1. I can't access the checkboxes' onClick properties for some reason,

http://dunck.us/collab/GreaseMonkeyUserScripts#head-4ac4d1e80f8bbd66bf4f1fbea77ea2390b6a2870

Because it's an XPCNativeWrapper.

> 2. I'm not having much luck adding a listener to the archive button's
>  onclick event

Do like gmail does.  Put a listener up at an element that doesn't get
removed/replaced all the time, and inspect the target of the event, when
it bubles up.

> I could set up an interval to look for it and add the event listener

Don't!  I never could reproduce it, so I'm not sure, but I'm 99%
confident that the setInterval() I was using way back when in Gmail 
Delete Button is what got people's accounts locked out.  It seems that 
(especially on slower CPUs) eventually that interval and the one that 
refreshes the page to check for new mail collide, and somehow an 
infinite, immediate, reload loop starts.

> 3. What would be ideal would be to find gmail's screen-redrawing 
> function and just override that. 

There's definitely not just one.  And I feel for you.  I did a lot of 
work towards that end for my later versions of GDB.  All I could do is 
sift for strings that seemed to be unique to elements, and try to find 
functions that reference them .. It's simply difficult with no real 
identifiers!



More information about the Greasemonkey mailing list