How to Disable Copying Text On Blogger | 100% Working

Namaskar Dosto,

Aapke Dwara Likhe Kadi Mehnat Se Article, Kuch Bloggers Apni Website Par Prakashit Kar Income To Krte Hi Hai, Sath Hi Credit Bhi Apne Naam Kar Lete Hain. Isse Aapko Nirasha To Hoti Hi Hai, Sath Gussa Bhi Aata Hai.

Main Aapko Aaj Is Dubhida Se Niptne Ka Sarl Marg Btaunga, Jisse Aap CTRL+A Button Ko Disable Kar Denge, Ho Skta Hai Kuch Purane Browser Ise Support Na Kren. Lekin Ye Trick 100% Khra Utrata Hai.

Yeh Aapke Blog Ki Samagri Sahityakaron Se Bchane Ke Liye Bhut Hi Upyogi Hai. Ye Trick Bhut Hi Sarlta Se Blogger Post Mei Copy/Paste Ko Nishkriya Kar Dega. 

How to Disable Copying Text On Blogger

Method 1: Using JavaScript To Disable Copy Paste In Blogger

  •  Sign into your blogger account and go to the Blogger “Dashboard”
  •  From the left side click on the “Template” section and then click on “Edit HTML”
  •  In the HTML editor window, Find the line “<head>.”

1st Script
<script language='JavaScript1.2'> function disableselect(e){ return false } function reEnable(){ return true } //if IE4+ document.onselectstart=new Function (&quot;return false&quot;) //if NS6 if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } </script>

<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 true" ); } </script> 
Click on the “Save Template” button and you are done. Go to your blog home page. Reload the page and then try to copy your content to make sure the code is working.

Method 2: Using CSS To Disable Copy Paste In Blogger

If you don’t want to use JavaScript, here is another impressive solution for you to disable copy paste in blogger. Actually, you can use a small piece of CSS code too to do the same task.
  • Follow the above steps 1, 2 and 3. At step 3, find the ending CSS “]]></b:skin>” except “<head>”.
  • Now copy the following CSS code and paste it right above the “]]></b:skin>”.

body {
user-select: none !important;
-moz-user-select: -moz-none !important;
-webkit-user-select: none !important;
-ms-user-select: none !important;
.post-body blockquote, .post-body pre, .post-body code {
user-select: text !important;
-webkit-user-select: text !important;
-ms-user-select: text !important;
-moz-user-select: text !important;

Configuration: The first part of the above CSS code will disable copying everything of your blog. The second part will allow user to copy the text inside “blockquote, Pre and Code” HTML tag. If you share code on your blog and let user copy only that piece of content, you can simply copy the above entire code. Otherwise, copy only the CSS Block named “body{……}” and implement in your blog to protect everything. 
Also Read
Related Articles

Post a comment