Streats Posted June 16, 2021 Share Posted June 16, 2021 Some websites are set up so that if you copy some text from their site, it adds a link to their site when you paste it. Does anyone know a way to achieve this in Squarespace? For someone with little to no coding skills (ideally a simple script or code snippet they can add to their site customisation). NOTE: I am aware that it not possible to completely stop people copying content, so please do not explain how people can just take a screenshot etc. My objective is to add whatever deterrents I can even if it won't solve it completely. I found an article about a script called Copy-Magic-Paste but it's from 2015 so I can't tell how to use it with Squarespace. Link to comment
Wolfsilon Posted June 16, 2021 Share Posted June 16, 2021 Hello there, Methods to add a credit/auto link back to your website when a user cuts or copies your content elsewhere could prove to be more complex and difficult because you do not have full access over the core Squarespace template. People will just delete the end line too. But I will say, if you're sharing material that you don't want people to steal, and you know that it is your original work, you own the copyright for it and you'd be operating well within your rights to hold individuals accountable. I digress, but if you're open to an alternative method, you can just disable the ability for anyone to right-click or copy your content using Jquery. Insert the following code into your Header Code Injection Field. <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> <script> $(document).ready(function () { $('body').bind('cut copy paste', function (e) { e.preventDefault(); }); }); </script> When you test this via the SQS editor, you'll be able to highlight the content on your end, but if you access your public website on another tab or window, you won't be able to copy or right-click. Hope this helps, -Dan Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment