-->

Page protection

Network Site Protection Cisco IOS Commands

There is nothing more frustrating to see ones hard work copied to an other homepage. Therefore are some simple script found on the internet given below.

 


Place the following scripts in the <head> section, between the <head> and </head> tags of your document:


1. This following scripts prevents the use of the right mouse click, help protect images and code from unwanted "borrowing". Both scripts do the same thing and work in all browsers).

<SCRIPT language=JavaScript>
// No rightclick script for IE
function click()
{
if (event.button==2)
{
alert('NO RIGHT CLICKING ALLOWED');
}
}
document.onmousedown=click
</SCRIPT>

<SCRIPT language=JavaScript>
// No rightclick script for Netscape
if (navigator.appName.indexOf("Netscape") != -1){
window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
window.onmousedown=rightclick;
window.onmouseup=rightclick;
function rightclick(e) {
if (e.which == 3) {
alert('COPYRIGHTED - NO RIGHT CLICKING ALLOWED')
return false;
}
else {
return true;
}
}
}
</SCRIPT>

 
<script language="JavaScript1.1">
<!-- Begin
function right(e) {
var msg = "This page is copyrighted";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
return true;
}
document.onmousedown = right;
// End -->
</script>


2. Internet Explorer 6 has a save feature that makes an Image Toolbar pops up whenever your mouses over an image. This will allow you to save the image. To prevent this, insert:

<META HTTP-EQUIV="imagetoolbar" CONTENT="no">

Insert between the <HEAD></HEAD> tags to disable the Image Toolbar for the entire page.To disable for individual images, place GALLERYIMG="no"; in your IMAGE tag. Example:

<img src="images/filename.jpg GALLERYIMG="no" alt="ImageName">


 

3. This script disable the right-click menu when using your mouse. Some people prefer this to a "No-Right-Click" script because a "No Right-Click" frustrates visitors
 

<SCRIPT LANGUAGE="JavaScript" type="text/javascript" >
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
//--></SCRIPT>


 

4. Another little script that is nice for images, but does not protect them is a message script that creates a popup message when the image is right clicked.
This goes in the head section like all the others

<script language="JavaScript" type="text/javascript">
<!--function popupMsg(theMsg) {alert(theMsg);}
//-->
</script>

Now place this within your image tag

<img src ="images/yourimage.jpg" onMouseDown="popupMsg(This is a © copyrighted image, please contact 'INCLUDE YOUR CONTACT INFORMATION HERE')">


5. Another little simple script, that does the same as 1 and 2, but is placed in between <Body> and </Body> is:

<SCRIPT language="JavaScript1.2">
if (document.all)
document.body.onmousedown=new Function("if (event.button==2||event.button==3)alert('Copyright© by ....')")
</script>


6. This little script removes the possibility to mark and copy text on the page. It is placed instead of <Body> in the top of the page:

<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">