Restrict Right click of mouse
On your website, for protection of source code and photos, it is possible to restrict visitor from right click on your web page.
Place this script between the tags and <HEAD> </ HEAD> of your HTML code:
<SCRIPT LANGUAGE="JavaScript">
<! - Disable
disableselect function (e) (
return false
)
reenable function () (
return trues
)
/ / if IE4 +
document.onselectstart = new Function ( "return false")
document.oncontextmenu = new Function ( "return false")
/ / if NS6
if (window.sidebar) (
document.onmousedown = disableselect
= document.onclick reenable
)
//-->
</ script>
Another option is to disable right-click in each body tag:
<body onselectstart="return false" oncontextmenu="return false" ondragstart="return false" onMouseOver="window.status='..message Personal'; return true;" ..>
Note: This protection is still on, this really does not preserve your pages, as there are several ways (data at all and extremely easy as pressing two buttons on the mouse at the same time or bomb clicks rights to ... the limit, take a picture of the screen.) counter for protection.
For example, under Firefox, to work with this "protection":
Go to menu
"Tools"> "Options"> "Web Features"> "Advanced" and uncheck "Disable or replace context menu".
You can also disable JavaScript or use a browser that does not support it.
Source:
http://www.editorjavascript.com