Prevent Right-Clicking on Your Site

 

To prevent any person visiting your site from right-clicking on any objects on your site, follow these instructions:

  1. Go to Site Editor
  2. Click on Settings in the top tabs of the page
  3. Click on SEO along the left side of the editor
  4. Copy, then paste, the following code into the box labeled Header Code:
    1. <script>
      document.oncontextmenu = function(e){
      var target = (typeof e !="undefined")? e.target: event.srcElement
      if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
      return false
      }
      </script>
  5. Click on the Save button, on the bottom-right

 

*Be advised that disabling right clicking is not 100%. For instance, anyone can screenshot a picture on your site, and there is no way to prevent that.