Never been to DZone Snippets before?

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

To prevent Greasemonkey user scripts from executing on your web site (See related posts)

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:

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

Comments on this post

Leech posts on Jun 19, 2005 at 22:54
should be:

   1  
   2  <script type="text/javascript">
   3      window.addEventListener = null;
   4  </script>

You need to create an account or log in to post comments to this site.


Click here to browse all 5545 code snippets

Related Posts