Saturday, June 11, 2011

Protect your post content

All of us want to protect their content, especially when spend of lot of time to write it, even we share all knowledge we need to keep our content in safe place.

So below its a javascript which will protect your content from copy, its simple, and purpose is to discourage the visitors to copy it.

How to do it?
Log in blogger / Dashboard --> Design --> Add Gadget - scroll down --> HTML/JavaScript --> copy the next code and past in in HTML/JavaScript text box area


<script language="JavaScript">
<!--  
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com  
var message="Function Disabled!";  

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}  
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){ alert(message); return false;
}
}
}  
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}  
document.oncontextmenu=new Function("alert(message);return false")  
// -->
</script>

When someone will try to do right click a message will appear “Function disabled” , you can change this message too if you wish.

Visit PsPrint.com to get the best deals in commercial printing!
Share this post:

13 comments:

seo reseller said...

It's useful for image and other copyright issues on online content.

Claudio said...

Great! but you can still copy selecting and then ctrl+C, is there a way to block that too?
thanks!

Anonymous said...

but it is not applicable for keyboard commands... ie ctrl+c or ctrl+v . make sure you do that also...

pharmacy 1 said...

Fantastic website. A lot of useful info here. I'm sending it to some friends ans also sharing in delicious. And obviously, thanks for your sweat!

Techno Tweaks said...

Thanks a Ton!

sunil said...

Thnax for the article admin :-)

Jenelle said...

Thanks this is just what I was looking for!

Send SMS Thailand said...

Plagiarism has been an issue even before internet age was born. As website owners, it is our responsibility to protect the contents in our pages.

Charanjeet Singh Sohal said...

interesting!!!!!!!!!!!

ajay yadav said...

thnq for share this information

http://techmediaa.blogspot.in/

Dianne dy said...

Definitely a helpful tip in optimizing images . At least now, I am more confident about the privacy of my posts and images..

Fusion Cash Fever said...

So easy!! Just what I was looking for!! Thanks so much!!

android phone said...

It's useful for image and other copyright issues on online content.

Post a Comment