Nov 9, 2016

How to Disable Right Click Copy Paste Function in Blogger [Text Selection]

data:blog.title
How to Disable Right Click Copy Paste Function in Blogger [Text Selection]? - You have seen many of bloggers disable copy function on their blog. It is because most of Genuine bloggers who works a lot for their blogs and write content for their blog always face the problem of being content copied by the newbies who are just entering to the Blogosphere with the goal of making money without the making real efforts and understanding the value of actual content and things which like readers.

disable text selection in blogger, disable copy paste in blogger, Disable Copy in Blogger, Prevent Blog Content from Being Copied, disable right click in blogger

Sometimes the copied content by them get a higher ranking by the search bots compare to your original content. So, it is important to protect your blog content from these type of foolish newbies (Content thieves) who never understand the value of our efforts and real work.

The agenda of this post is How To Protect Blog Content from Being Copied? Actually, We make it possible by disable the right click of the mouse on our blog page and also turn off the CTRL+A.

We have two options for make it possible First by JavaScript (If you want to Disable Text Selection.) and second is by CSS Coding (If you want to share some Codes/Text of your page for allowing your readers to copy them). Now option is yours, Via JavaScript or Via CSS. Follow below instruction and follow that option which you want to use on your blog.

How To Disable Right Click Copy Function Via JavaScript?

  • Go To Blogger >> Template >> Edit HTML.
  • Now search for <head> tag and paste below JavaScript code just after of <head> tag. You can search by pressing CTRL+F or CMD+F.
<!--Disabe Copy Paste by MBG-->
<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>

  • Now, Save your Template.
  • Open your blog and check the result.

Disable Right Click Copy Function Except Specific Codes/Text with CSS.


This is the magic code, which is using on our blog, because we are sharing guides where readers need to copy some codes like CSS, HTML, JavaScript, etc. And same time we don't allow our users to copy another text area of blog post except for specific codes/text which we have allowed copying and this is possible with little CSS Coding.

Also Read -
- Add a Stylish Contact form to Static Page in Blogger.
- 4 Best Below Post Subscribe Box Widget for Blogger.

Now, If you want to use this magic code on your blog the read below instruction and follow all steps carefully.

  • Go to Blogger >> Template >> Edit HTML.
  • Now, Copy and paste below code just above of ]]></b:skin> tag inside your Template Code.
/*----- Disable Text Selection with CSS Code by MBG----*/
.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;
}

Important: In the above CSS code we have enabled the copy/selection of text/code we post using blockquotes by allowing .post blockquote, but it may not work for you if your template is using different CSS class for blockquote for, e.g., Our template using blockquote where your template may be using .post-body blockquote. So in that case you need to replace .post blockquote with .post-body blockquote or blockquote in above CSS code.  If you do not share any codes or content than just copy paste this little piece of CSS code to disable all text area on your blog

/*----- Disable Text Selection with CSS Code by MBG----*/
body {
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;
}

Benefits of using CSS rather than JavaCript?

  1. The JavaScript Code slow down Blogger Blog loading speed which can affect our rank in search engines, and CSS Codes do not lower the speed of your Blog/Website.
  2. When we use JavaScript for this function, Do you know what does a copy cat do? Only disable the JavaScript inside browsers and reload the page. Then our JavaScript code does not work, and a copy cat can just select the text and copy it and in another side when we use CSS Coding there is no option to stop CSS coding to load. Some excerpt users can do this, but expert users rarely do that.

 Conclusion: 

So above guide is about How to Disable Right Click Copy Paste Function in Blogger [Text Selection]? We hope by this tutorial you can do it easily. If anyhow problem persists after following all above steps then drop a comment below. I will help you out of sure.

Do Share.
Thank You! Stay Blessed!
Search Tags: How to Disable Right Click in Blogger, How to Disable Copy Paste in Blogger, Disable Text Selection in Blogger Blog, Disable Right Click in Blogger/BlogSpot.

No comments:

Post a Comment

We’re eager to see your comment. If you have any query related to the topic then drop a comment below. We will help you out of sure. However, Please Keep in mind that all comments are moderated manually by our human reviewers. According to our comment policy all link are nofollow so keep in mind that never use links in comments, we consider link comments as a spam.