Right-Click Disable
There seems to be a lot of interest in the right-click disable code to stop
people from stealing picture or even viewing the source code for your listing.
First, let me assure you that not only is this a wasted effort (it doesn't
really prevent anything) it is also annoying and actually interferes with
navigation for many people who use the right-click menu for that purpose. My
best advice is: don't use it!
That said, if you simply must have the code, here it is:
<script language="javascript">
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>
Note: although this code contains no restricted constructs and is therefore
allowed in eBay listings, any JavaScript may interfere with various scripts used
by eBay from time to time so results may be unpredictable, and using this may
give you a false sense of security and will probably reduce the number of bids
you receive. Therefore, use it at your own risk!