DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

To Prevent Greasemonkey User Scripts From Executing On Your Web Site

  • submit to reddit
        I found this code on Mark Pilgrim's website, it's his code.

To prevent Greasemonkey user scripts from executing on your web site, put this line within the HEAD of every page:

<script type="text/javascript">
    window.addEventListener = null;


Snippets Manager replied on Mon, 2012/05/07 - 2:11pm

should be: window.addEventListener = null;