In this post
- disable right click to prevent downloading photos
- save images/inspect element when the right click feature is disabled
In this post
How to Disable Right Click on Squarespace with JavaScript
To disable Right Click on Squarespace Site, you just need to follow these easy steps.
Access Home > Settings
Click Advanced
Click Code Injection
and insert this code to Header
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function () { $("body").on("contextmenu",function(e){ return false; }); }); </script>
Saved. Done!
How to Save Images/Inspect Element when the right click feature is disabled
Sometimes you want to download images/inspect element from a website that has disabled Right Click.
You can follow the instructions below.
1. Press Ctrl + Ship + C (Windows) or Command+Option+C (Mac) to open Chrome Dev Tools
2. Press Ctrl + Shift + P (Windows) or Command+Shift+P (Mac) to open the Command Menu
3. Start typing JavaScript and select Disable JavaScript, then press Enter.
All JavaScript is now disabled. You can try saving images or Inspect Element!
Thank you 🙂
Hi there,
I have copied the above script as suggested but now i have this on my website header-
How do i remove the below from my website header?
script type=”text/javascript”> $(document).ready(function () { //Disable full page $(“body”).on(“contextmenu”,function(e){ return false; }); //Disable part of page $(“#id”).on(“contextmenu”,function(e){ return false; }); });
Have you solved it yet?