|
Disable Select All Text For Sites
Today, I want my readers to know how to protect your hard work put on creating and writing new articles on your website or blog from being copied by others.
Copying the text from your site and posting it elsewhere is common on the Internet. There are sites which doesn't allow us to copy the text from the web pages. The copy function is disabled in the site by the site admin in order to protect the site. We will see how to implement the same methodology for Blogger. This trick is valid for any sites. This trick is going to disable (Ctrl+A) function for your site.
Sometimes the trick may not be compatible with some old browsers. But, we will see how to make things more secure in my future posts.
Steps to implement:
1. Go to Dashboard > Select the blog where you would like to implement the code
2. Go to Layout > Add a Gadget > Select "HTML/JavaScript gadget"
3. Paste the following code in the box:
<!-- START disable copy paste -->
<script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'></script><script type='text/javascript'> if (typeof document.onselectstart!="undefined" ) { document.onselectstart=new Function ("return false" ); } else{ document.onmousedown=new Function ("return false" ); document.onmouseup=new Function ("return true" ); } </script>
<!-- END disable copy paste -->
4. You are done!!! Check out how it works.
Note: The above code can also be placed between <head> & </head>
0 comments:
Post a Comment