Disable Text Selection & Copy Paste in Blogger[3 Best Ways]

Disable Text Selection & Copy Paste in Blogger [ 3 Best Ways ]

How to Disable Text Selection, copy-paste function in Blogger, and How to disable Copy Paste function in blogger. So we will be going to see 3 methods by using Pure CSS and JavaScript. If you do regular blogging then you must know the importance of unique articles. And obsessed with protecting your content from people who copy and paste/post as their own writing, then you can disable text selection on your blog. 

So, To protect the content of our website, we will learn to disable copy-paste and text selection on our site. In this article, I shared the 3 Most Useful methods t prevent content from copy pasters who commonly do this for fun. 

How to Disable Text Selection & Copy-Paste Function in Blogger-min
How to Disable Text Selection & Copy-Paste Function in Blogger



Before let us know,

 

Why Disable Text Selection in Blogger website?

You should Disable Copy Paste in Blogger or any other website because there are lots of thieves of your content. while most of the new bloggers don't like to write content due to lack of knowledge and other reasons. 
In my case, our Technical Arp website we already use this to prevent our unique content, but let me tell you the Most obsessed part is Google takes no action to this. Even sometimes Google assigns a higher rank to that duplicate content. Sad Right! 

 So Use any one of the below methods as per your website needs, Let's Start.

Steps to Disable Text Selection & Copy-Paste Function in Blogger

The following are 3 Methods and Steps to use in your Blogger template.

 

METHOD 1: USING PURE CSS - MOST PREFERED METHOD [USE THIS]

In this method, Paste Below CSS Style in your template by following some steps.
  1. Go to Blogger Dashboard
  2. Go to Theme/Template Section
  3. Click Edit HTML
  4. Now Search for  </head>  or Find & Past Below STYLE CSS Code Before ]]></b:skin> 

<style type='text/css'>
body{
display:block;-khtml-user-select:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
-o-user-select:none;
user-select:none;
unselectable:on;
}
</style>
Now Save Template and check are you able to select anything? No Right! (Sorry for those who taught there will be a very difficult and long solution :). NOTE: It is applied to complete Website Body If you want to use only for Post content then you just need to change the body tag to your post-class like

<style type='text/css'>
article-content, post-entry, etc {
display:block;-khtml-user-select:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
-o-user-select:none;
user-select:none;
unselectable:on;
}
</style>
If the above Disable Text Selection CSS is not working for you then Check Your Post Class for this in your template and put that in style in place or etc.  Now If you provide CODE or QUOTES in your website then Enable Copy Paste in your pre, blockquote, and code tags. By using the above CSS and Below CSS users will only be able to copy from pre, blockquote, and code tags.

<style type='text/css'>
blockquote, pre, code {
user-select: text !important;
-webkit-user-select: text !important;
-ms-user-select: text !important;
-moz-user-select: text !important;
}
</style>

METHOD 2: Using jQuery to disable Copy-paste function in blogger blog [USE THIS ONLY AFTER READING ABOVE METHOD ]

Follow the below steps -
  1. Go to Blogger Dashboard
  2. Go to Theme/Template Section
  3. Click Edit HTML
  4. Now Find & Past Below SCRIPT Code before </body>

<script>
$('body').bind('copy cut drag drop', function (e) { e.preventDefault(); });
</script>
That's It: If you want to target a specific Class or tags then replace 'body' with some other tags or class as '.className'. So, now it's time for a more advanced method.

 Also Use: Responsive Bottom Sticky Ads

METHOD 3: Using Advanced Javascript to prevent Copy paste in blogger blog [USE THIS ONLY AFTER READING ABOVE METHOD ]

Follow the below steps -
  1. Go to Blogger Dashboard
  2. Go to Theme/Template Section
  3. Click Edit HTML
  4. Now Find & Past Below SCRIPT Code before </body>
CODE 1: SIMPLE

<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>
CODE 2: ADVANCED

<script type='text/javascript'>
// PREVENT CLIPBOARD FOR COPYING CONTENT
document.addEventListener("copy", function(evt){
// Change the copied text if you want
evt.clipboardData.setData("text/plain", "Copying is not allowed on this webpage");

// Prevent the default copy action
evt.preventDefault();
}, false);
</script>
Code 2 is very secure to use as it prevents Shortkey also. Working on this code is
  • We listen to the copy event.
  • If you want, you can change the copied text in the clipboard with evt.clipboardData.setData("text/plain", "WRITE YOUR MSG").
  • Finally, as usual, we prevent the default copy action – evt.preventDefault().

Amazing Script: Voice to Text Converter Tool Script

For a complete demo of the script with a proper installation and usage guide please watch the complete video.

Disable Text Selection & Copy Paste in Blogger




In Conclusion of Best Way to Disable Text Selection and Disable Copy in Blogger or any website.


Well, it is most important to protect your content from copy-pasters bloggers. so now after reading this article on how to Disable Copy paste in blogger. You have successfully Block copy-paste features on your blogger blog.

I have tried to be as informative as possible in this article. I hope that this trick will help you to protect your hardly written content by using any of the above-mentioned methods.
  
If anytime you don't want to disable copy-paste features on your blogger blog. You can enable that features by just removing the where you paste the code using this tutorial. Your blog copy-paste feature will be re-enabled then.

If you have any problems or have any suggestions. Let me know them in the comments section.

Thanks for Visting: Follow by Email and Bookmark Our Technical Arp Website for more such useful scripts.

Read More:


Previous
Next Post »

3 comments

Click here for comments
Romeo Thomaz
admin
26 July 2021 at 10:12 ×

hi how do i enable disable right click but only links can clicked

Reply
avatar
John Doe
admin
29 November 2021 at 02:42 ×

Great Article on Blog design Css And Html Tutorials and Premium Blogger Themes Free Download

Blog Name :- Live Blogger
Blog Url :- https://www.liveblogger.xyz/

Reply
avatar
Ania Kowalik
admin
17 December 2023 at 07:03 ×

Thanks fot this article. Very help to me.

Reply
avatar