syndication

Disable Right Click to Save and Drag and Drop on Images

The first thing you want to do is to enter a code injection throughout your whole site.  From the Home menu of your Squarespace editing dashboard, click Settings → Advanced → Code Injection.  If you need more help getting to this screen, check out our Code Injection tutorial.  In the text box entitled Header, paste the following code



<script type="text/javascript">
      function nocontext(e) {
        var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
        if (clickedTag == "IMG")
          return false;
      }
      document.oncontextmenu = nocontext;
    </script>


Once you've pasted the code, click Save and return to the home menu.  From there, we need to enter some custom CSS.  To enter the CSS, click Design → Custom CSS.  For more help on entering custom CSS, check out our CSS tutorial.  In the text box, paste the following code


  img {
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -webkit-user-drag: none;
      user-drag: none;
      -webkit-touch-callout: none;
    }



That's all....