How To Disable Copy and Paste in Blogger Blog Posts


One issue in blogging is where to get post from. Where to get post from is very easy if you are following your blog niche. But bloggers out there who don't know what to write will start looking for niche related blogs and when they finally see one, they start to duplicate their contents all because they need to to learn fast. It is very bad and can affect your blog in many ways because you don't know if the content you duplicated is already protected by Copyrighted companies like DMCA or if the content is malicious. You might also not know the mind of the real owner of the content if he or she is nervous about the copied content.

Read Also : 



This Tutorial can be done by bloggers using blogger platform. Are you facing issue of newbie bloggers copying your contents without permission, there is a way you can restrict them from copying or selecting your blog post and this can be done via methods i am going to lay out below.

How To Disable Copy and Paste in Blogger Blog Posts


How To Get Started


METHOD 1 : JAVASCRIPT (GADGET)

Sign in your Blogger Dashboard

Click "Layout" section in the left menu. Then click "add a gadget link from any of the sections. I recommend sidebar or post body (Blog1)

In the Gadget Pop-up, Select "Html/Java Script"

Now copy below code and paste it in the html section.

<!- START disable copy paste - ogbongetechs.com --><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 false"); } </script><!-- End disable copy paste - ogbongetechs.com -->

Save the script.


METHOD 2 : JAVASCRIPT (TEMPLATE)

In your blogger dashboard, navigate to the "Theme" section.

Click "Edit HTML"

Let the html editors page load completely. Then tap anywhere in the code area and click CTRL+F to launch your search box. (For Mac PC, use CMD+F

Search for <head>

Paste the following code right after/below the <head> tag

<!–Disabe Copy Paste— mokoshalb.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>

Click "Save Theme" and preview your blog Fr result.


Enabling Selection of Usable Texts or Code 

This is one magic used on some blogger blogs that disabled text on their blog. They use this on their blog because they might want to share some tutorials where readers or visitors need to copy some codes (Javascript/Css/html) they share.

Therefore on the these bloggers (who disabled text section on their blog) do not let readers select not to talk of copying their posts’ text area other than codes/Text they want to share to readers. However, if you will need this (becuase it is important), kindly use the simple CSS code where you are going to enable the selecting and copying of text/code you post in “blockquotes” only.

How To? 

Now still in your blogger html code editors page, search for ]]></b:skin>

Paste below css code given below right before this ]]></b:skin> code line.
(Note :- use Ctrl+F in Windows and Cmd+F in Mac to search in template code). 


/*—– Disable Text Selection with CSS Code— mokoshalb.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;
}

NB: – Looking at the CSS code code above, i enabled copy or selecting of text/code in blockquotes by enabling .post blockquote.
The code might not work for you if your blogger theme is using a different CSS class for your blockquote.
For instance, i might be using .post blockquote where yours ma be .post-body blockquote or blockquote. Therefore, in that situation you have to replace .post blockquote with .post-body blockquote or blockquote in above CSS code.

Finally Save your theme.

And for those who don't share codes in their website or blog that is if your blog is a "read and go" blog, you can use below css code to totally disable all text on your blog.

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

I will recommend you to use css over javascript because, if you use javascript, there are some browsers that can disable javascript and when the javascript is disabled on your blog, it will be bypassed and copycats will have ful access to all your contents.


Recommended : 

==> How To SEO Optimize Your New Blogger Blog and Make Google Search Engine Crawl Your Post and Pages





Subscribe To Our Newsletter
Follow Us On Twitter and Instagram

Comments

Post a Comment

We Love To Hear From You. But Don't Spam Us With Links