How to Disable Copy and Paste in Your Blogger Blog - dineshtamang.com.np

Breaking

Monday, April 16, 2012

How to Disable Copy and Paste in Your Blogger Blog

Thinking of a way to make it more difficult for people to copy the contents of your blog? Here's a neat little JavaScript that will disable Copy and Paste.

Login To Blogger Go To > Design > Edit HTML.

and mark the tick box "Expand Widget Templates"

Then, find (CTRL+F) this code in the template.

</head>
And immediately before it, paste this code:

<!-- Disable Copy and Paste-->
<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>
Here we are using JavaScript to disable copy and paste on website or blog . So If someone disables the browser JavaScript support , the contents could be easily copie

No comments:

Post a Comment