[Greasemonkey] Ungreaseable

Nikolas Coukouma lists at atrus.org
Thu Aug 18 18:59:51 EDT 2005


Nikolas Coukouma wrote:

>Nikolas Coukouma wrote:
>
>  
>
>>Mark Pilgrim wrote:
>>
>> 
>>
>>    
>>
>>>Following up on my earlier ramblings about "monkey-protected" pages,
>>>it disturbs me greatly that this simple script is all you need to
>>>counteract any Greasemonkey scripts on a page:
>>>
>>>http://diveintogreasemonkey.org/experiments/ungreaseable.html
>>>
>>>Perhaps enquiring minds can break it for me?
>>>   
>>>
>>>      
>>>
>Er, to be proper:
>unsafeWindow.document.body.__defineSetter__("innerHTML",function(){});
>
>On the other hand, there's a better ungreaseable script:
>
>(function(){
>document.getElementById('test2').addEventListener('click', function() {
>        window.location.href = 'http://diveintogreasemonkey.org/';
>    }, true);
>var savedPage = document.firstChild.cloneNode(true);
>window.setInterval(function() {
>  document.replaceChild( savedPage, document.firstChild );
>}, 1000);
>})();
>
>Cheers,
>-Nikolas
>
Whoops, you still need the initPage function to restore the event listener.


More information about the Greasemonkey mailing list