[Greasemonkey] Greasemonkey and GMail

Nikolas Coukouma lists at atrus.org
Thu Aug 18 18:20:13 EDT 2005


Mark Pilgrim wrote:

>On 8/18/05, Shaya Potter <spotter at cs.columbia.edu> wrote:
>  
>
>>1) it gives an error for me, and I'm not running linkify (or anything
>>that I can tell should change the page)
>>    
>>
>
>OK, I introduced a small bug just before uploading.  It's apparently
>sensitive to whitespace after the </script> element.  It should work
>now.
>
>  
>
>>2) what's to stop a greasemonkey script from doing?
>>
>>"initialCRC = CRC32.getCRC(document.body.innerHTML);" as it's last
>>command, wouldn't that update the CRC?
>>    
>>
>
>Well, in GM 0.5 you would need to set unsafeWindow.initialCRC, but
>yes, a user script could do that.  And then the page can set a watch
>to it to make sure it doesn't change after it's initially set.
>
>window.watch('initialCRC', function(name, oldVal, newVal) { return oldVal; });
>
>  
>
window.unwatch('initialCRC');
// do stuff
window.initialCRC =CRC32.getCRC(document.body.innerHTML);

Also note that user scripts can define getters for innerHTML


More information about the Greasemonkey mailing list