Home Blogging How To Protect Website Contents From Copying ( Disable Text Selection )

How To Protect Website Contents From Copying ( Disable Text Selection )

0
SHARE
In this article, we share two different methods of disable copy / paste or text selection feature in blogger blogs. When any newbie entering in the field of blog-o-sphere, they can be copy contents from different sources and then paste it into their blog posts. Many sincere bloggers don’t want of their articles copied by anyone. 
Because this becomes copyright or duplicated contents.Many bloggers who want to make money from blogging and want to publish new contents just by copied from other sites like my site or your. 

Recommended Article’s 

How To Protect Website Contents From Copying ( Disable Text Selection )
Many times their articles ranking will be higher in the search engines as compared to your original contents, so it is very important for you to protect your contents from these copy caters by simply restricting it using some CSS and JavaScript code. 
In this guide, i’m telling you to how to disable the copy paste function and disable the right click and text selection function. Here i’m share a two different processes, if you want to disable the whole text area of your blog posts then use first method by using JavaScript code, and if you disable now whole text and provide some text to your users to copy them then follow the second method. 

#1 Method : Disable Whole Text Selection in Blogger Using JavaScript

Step 1 – First of all go to your blogger dashboard, and then go to “Template” and click on “Edit Template” .
How To Protect Website Contents From Copying ( Disable Text Selection )

Step 2 – Click anywhere in the html code area and press CNTRL + F and find the below tag.

</head>

How To Protect Website Contents From Copying ( Disable Text Selection )
Step 3 – Copy Below Code and paste just above this tag.

<!–Disabe Copy Paste— By – www.bloggerhope.com –>
<script language=’JavaScript1.2′>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (&quot;return false&quot;)
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

Step 4 – Now save your Template and view your blog and see the result.

Now with this method, you can disable the whole text area for your visitors, if any one want to copy text, then they won’t copy anything . But if you want to provide some text to your readers to copy them, then follow second method below.

#2 Method : Disable Text Selection Except Some Specified Text Using CSS

This method is more useful , because many of your text you want to provide your readers to copy them like some codes, some texts, or something other. And almost everyone who use this features, always use this method.

In this method we use CSS code and disabling the text selection or right click feature. Some text which you want to enable for copy paste, this code is only for you. Now follow the method.

Step 1 – Go to your Blogger dashboard, and click on “Template” and select the option “Edit HTML” link.

How To Protect Website Contents From Copying ( Disable Text Selection )
Step 2 – Click any where in the text area and click CNTRL + F for finding this tag.

]]></b:skin>

How To Protect Website Contents From Copying ( Disable Text Selection )

Step 3 – Now copy below code and paste just above this tag. 

/*—– Disable Text Selection with CSS Code— By – www.bloggerhope.com —-*/
.post blockquote {
-webkit-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
user-select: text !important;
}
body {
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;
}

Note : This code is useful if you want to allow to your readers to copy and paste some text, but if you want to disable whole text, then simply use below piece of code.

/*—– Disable Text Selection with CSS Code— By – www.bloggerhope.com —-*/
body {
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;
}


Note That : You can simply use this CSS codes, by adding this code, simply go to the Template Designer of your blog and click on the ADD Custom CSS and paste this copied CSS code and save your template .

You’ve done all your work.

Recommended – Use CSS Instead of JavaScript

We recommended you to use CSS method instead of JavaScript. JavaScript has biggest setback is that, user can simply go to the browser and disable inside it and then reloading your page, then your blog will be again in normal mode and anyone will be able to copy paste anything.

But if you use CSS code, then it will not be disable anyone, many experts can also remove or disable CSS code too, but newbie don’t use this feature.

So overall CSS code is the best as compared to the JavaScript code. You may let us know about this article, hope you will understand everything, and if any you’ve any question into your mind, then please share in the comment section below, i’m reply you soon as possible.