The following is a small script i composed that will disable right click. People can probably still view your source through "View Source" but they cant right-click on your site!
<script language="JavaScript">
<!--
function mouseDown(e) {
if (parseInt(navigator.appVersion)>3) {
var clickType=1;
if (navigator.appName=="Netscape") clickType=e.which;
else clickType=event.button;
if (clickType!=1) {
alert("Right Click Disabled !\nDon't Steal Kiddies.");
}
}
return true;
}
if (parseInt(navigator.appVersion)>3) {
document.onmousedown = mouseDown;
if (navigator.appName=="Netscape")
document.captureEvents(Event.MOUSEDOWN);
}
//-->
</script>
All it accomplishes is annoying your visitors. Many right click to open a link in a new window, to create a shortcut, or to print. I can't imagine anything good coming out of these scripts.
Actually I am working on one, as an educational experience to myself, that will allow them to open links in a new window, print a page or even save those images marked as saveable. I think it will be a good learning experience in the lengths I can take both javascript and cross-browser DHTML.
------------------
Wayne Luke
Internet Media Provider
SPeaking of hiding source code, check http://wsabstract.com . Check the forums and the javascript programming forum. We have a topic dealing with hiding source code..it can be broken, but a lot of people won't break it...
I've seen a few sites that put huge spaces in between there lines of html. Ofcourse, this makes no difference to the browser view but trying to view it in notepad/wordpad etc is very annoying and can put people off right away.
However, they will still be able to save the page and load it into there html / wysiwyg editor and it will probably cause the file size to increase somewhat and hinder the download time.
Bookmarks