[Greasemonkey] Greasemonkey and GMail

Nikolas Coukouma lists at atrus.org
Thu Aug 18 17:33:26 EDT 2005


Shaya Potter wrote:

>On Thu, 2005-08-18 at 15:00 -0400, Mark Pilgrim wrote:
>  
>
>>On 8/18/05, dmccunney <dennis.mccunney at gmail.com> wrote:
>>    
>>
>>>I don't offhand
>>>see a way the remote server would know it was being altered after
>>>receipt but before display.
>>>      
>>>
>>I must not be making myself clear.
>>
>>http://diveintogreasemonkey.org/experiments/detect-page-modification.html
>>
>>Run it with Greasemonkey disabled or uninstalled, and it will display
>>"No modifications detected."  Run it with Greasemonkey enabled and a
>>linkify script installed (thus changing the unlinked hyperlink), and
>>it will display "Modification detected!" and display the initial and
>>final CRCs.
>>
>>The page script can then use XMLHttpRequest or any number of other
>>methods (insert an <img> with special query parameters, load a URL in
>>a hidden <iframe>, etc.) to report this modification to the server.
>>    
>>
>
>1) it gives an error for me, and I'm not running linkify (or anything
>that I can tell should change the page)
>
>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?
>
One word: namespaces.

The page can do something to protect it's scope:
(function(){ 
  initialCRC = CRC32.getCRC(document.body.innerHTML);
 
})();


More information about the Greasemonkey mailing list