Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Looking for someone who can write simple code for Squarespace


Question

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Hello,

You can use the following code to block the right click function. There are still some workarounds for users that are motivated enough to steal your images and content but this will prevent a user from downloading and/or viewing the source materials for your website.

To insert the code, navigate to the Code Injection menu -- Home > Settings > Advanced > Code Injection.

Squarespace can be picky about where the code is inserted for it to work. First try inserting the code into the Header Code Injection field -- Hit "Save" and open your website in a new window and test. If that doesn't work, move the code to the the Footer Code Injection field.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
 $(function () {
   $(this).bind("contextmenu", function (e) {
     e.preventDefault();
   });
 });
</script>

 

In terms of blocking specific users from accessing your website, you may want to research a third-party IP address plugin like "IP-Approval".

 

Hope this helps!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...