How To Protect Your Website PicturesAs many of you know, I make and sell copper on my own website, I made this site in HTML so I could also use the code (slightly modified) as an ebay template as well. Recently I saw a post where people were saying their pictures and text were getting ripped off, so here is the code I use on my site to protect my pictures and text... before some of you say that there are ways around this, I know, but it will suffice for protection from 99.9% of people wanting to "borrow" you text / images.
To protect your images by disabling right click on your site, use the following code between your and tags:
Put < before script
script language="JavaScript" and > after "javascript" >
var message="This Page is the property of The Copper Kangaroo";
function clickIE()
{if (document.all)
{(message);return false;}}
function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu =clickIE;}
document.oncontextmenu=new Function("return false")
use /script tags here
To disable text copying, use the following code straight after the tag:
Put < before script
script language="JavaScript1.2">
function disabletext(e){
return false
}
function reEnable(){
return true
}
//if the browser is IE4+
document.onselectstart=new Function ("return false")
//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}
use /script tags here
Source:
http://goldismoney.info/forums/showthread.php?t=381276