|

PPC> Web
building> Scripts
No Right Click
How many times have you wished that folks wouldn't be able to just
filch nice graphics off your site, or read the source code? We
present a script that, while it won't stop the most determined
thieves, it will put them off for a while.
It's very short, and very simple:
<script language="Javascript1.2">
<!--
var ppcmymessage = "That won't work here, I'm afraid";
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
}
function ppcrtclickcheck(keyp){
if (document.layers && keyp.which != 1) {
alert(ppcmymessage);
return false;
}
if (document.all && event.button != 1) {
alert(ppcmymessage);
return false;
}
}
document.onmousedown = ppcrtclickcheck
//-->
</script>
You can change the message at the variable
"ppcmymessage" to anything you like. It doesn't have to
be "That won't work here, I'm afraid". To see it in
action, and how to use it, just click here.
Enjoy!
|