Tuesday 9 April 2013

How to Protect your Blog articles from Being copied?


stop plagiarismYesterday we shared a script about disabling right click on your blog to protect your content from newbies and thus today, we'll discuss about disabling text/articles from being copied by others. We'll use a simple JavaScript code which will prevent visitors even from selecting the text. Visitors won't be able to use either copy option or Select all option from their keyboards, because when they aren't able to select the text then how could they be able to do further. Using this way you can protect your articles completely from being copied by copycats. And this is very important in order to protect your blog content.

This script is very simple,  which can completely help you to away people from copying your text/articles. However, we sometimes provide codes in our tutorials i.e widgets, plugins, tricks etc. So we usually use <BlockQuote> tag for those codes, but this script interrupt with that and the codes inside <BlockQuote> will suffer and won't be selected. So you'll need to always insert your codes inside a <textarea> tag instead of <blockquote>. Now let's start installing this script on blogger platform.

How to disable copying text in blogger? 

Follow few simple steps to install a small piece of JavaScript code in your blog and get rid of copycats.
  • Go to Blogger
  • Layout >> Add a Gadget >> Select HTML/JavaScript Gadget
  • Now Copy below code and paste inside that HTML/JavaScript gadget
<script type="text/javascript">
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
Save your template and view your blog for seeing the result. Just try to select any text and you'll see the changes. It will disable Select ALL CTRL+A and CTRL+C options on visitors keyboards. 

This was a really cool script which will work better for everyone one who wants to get rid of thieves. I'm also planning to use this script on my blog, but after changing my all codes to <textarea>, because I've published many codes in <blockquote> tag. 

Take care and let me know if something is not understood by you, comment below the post and keep in touch. Suggestions and recommendations are also welcomed.

No comments:

Post a Comment