CÓDIGOS HTML Y JAVA
- No permite utilizar el botón derecho y no aparece nada (ni alert, etc)
<script language="Javascript">
<!-- Begin
document.oncontextmenu = function(){return false}
// End -->
</script>
- No permite seleccionar el contenido de una página
<script language="Javascript">
<!-- Begin
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
// End -->
</script>
- Por si hay algún error en la página
<SCRIPT language=JavaScript>
function blockError(){return true;}
window.onerror = blockError;
</SCRIPT>
- Para esconder la URL en el navegador (Utilizar un frame del 100%). De esta manera siempre se mostrará thedaniex.com y no thedaniex.com/algo.htm
<HEAD>
<TITLE>Página Incial -
www.thedaniex.com</TITLE></HEAD>
<FRAMESET rows="100%" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
<FRAME NAME="top" SRC="http://www.thedaniex.com/" NORESIZE></FRAMESET>
- Código JavaScript para que aparezca un alert al utilizar el botón derecho
<script language="JavaScript">
<!-- Begin
function right(e) {
var msg = " [
www.thedaniex.com ] ";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg); // Delete this line to disable but not alert user
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg); // Delete this line to disable but not alert user
return false;
}
return true;
}
document.onmousedown = right;
// End -->
</script>
- No permite el botón derecho y además te penaliza con 10 clicks
<script language="Javascript">
zaehler=0;
function right(e) {
if (navigator.appName == 'Netscape'){
if (e.which == 3 || e.which == 2){
alert("Aqui no puedes utilizar el botón derecho del mouse");
for(i=0;i!=zaehler;i++)alert("Ya te avisé, te penalizaré con \n "+(zaehler-i)+"\n clicks.");
zaehler+=10;
alert("¡La proxima vez que lo hagas será peor!
www.thedaniex.com"); return false;}}
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button == 2 || event.button == 3){
alert("Aqui no puedes utilizar el botón derecho del mouse");
for(i=0;i!=zaehler;i++)alert("Ya te avisé, te penalizaré con \n "+(zaehler-i)+"\n clicks.");
zaehler+=10;
alert("¡La proxima vez que lo hagas será peor!
www.thedaniex.com"); return false;}}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// --></script>
- Se abre una ventana al utilizar el botón derecho
<SCRIPT language=JavaScript>
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) {
a=window.open("http://www.thedaniex.com/","WindowName","width=640,height=600,top=40,left=50,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
a=window.open("http://www.thedaniex.com/","WindowName","width=640,height=600,top=40,left=50,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
return false;
}
return true;
}
document.onmousedown=right;
window.onmousedown=right;
</SCRIPT>