Make Money

Freelance Jobs Freelance Jobs

4.12.11

Prevent or disable copy contents of your blog or site

Delicious Digg StumbleUpon Reddit Subscribe to RSS Feed


If you want to prevent users from copying contents of your blog or site than you need to put this code in ur blog so that user can not copy ur blog's contents , i was browsing through POP SONG LYRICS and got this script

Go to Layout and click on add new gadget > select Html/Javacsript

Now in the box copy and paste the following code


<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>


Click on save and check whether u r able to copy or not .

Have fun

0 reactions:

Post a Comment

 

HOW TO HACK Copyright © 2010 LKart Theme is Designed by Lasantha