DeborahAtt Posted May 5, 2021 Posted May 5, 2021 Site URL: https://www.pelealumnicorp.com/ Hello I'm looking for someone who can do two things for our website: 1) disable the right click option so folks can not download pictures 2) if possible block a viewer from accessing the website The website I manage is http://www.pelealumnicorp.com Thank you, Deborah
Wolfsilon Posted May 5, 2021 Posted May 5, 2021 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.