• Page 1 of 1
  • 1
Archive - read only
uCause Community » Trash & Archives » Trash » No-Right-Click Script
No-Right-Click Script
SirDarknight(Tonmoy)Date: Tuesday, 2011-11-01, 5:28 AM | Message # 1
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
Description


A memorable experience for IE,FF,Opera and NS users who right-click on your page -- this script opens a popup that flies around the screen, screaming. Worse, you cannot shut the screamer up without following a special instruction.Very easy to install

Setup:


1.Create a directory named "screamer" in your sit'es file manager
a) Upload screamer.html and screamer.wav into "screamer" folder

2. Insert the following script in the <head> section of the
page you wish to protect with the no-right-click feature.
Modify the path in PopUpURL as noted in the script.

Quote
<script language="JavaScript">
// Put this script in the head of your page
// Set the path to screamer.html on your server
// The full http:// path is recommended
PopUpURL = "http://yoursite.com/screamer.html";
// Do not edit below this line
//----------------------------
isIE=document.all;isNN=!document.all&&document.getElementById;
isN4=document.layers;if (isIE||isNN){
document.oncontextmenu=checkV;}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;}
function checkV(e){if (isN4){if (e.which==2||e.which==3){
doFlyMe();return false;}}else{doFlyMe();return false;}}
var M=100;var speed=20;var increment=16;
var nowY=M;var nowX=M;var theWidth=window.screen.width;
var theHeight=window.screen.height;
var limitX=theWidth-100-M;var limitY=theHeight-100-M;
var s="width=100,height=100";
function doFlyMe(){P=window.open(PopUpURL,"q",s);
P.moveTo(M,M);P.focus();D();}
function D(){if (nowY<=limitY){P.moveTo(nowX,nowY);P.focus();
nowY+=increment;T=setTimeout("D()",speed);}else{
clearTimeout(T);nowY=limitY;P.moveTo(nowX,nowY);P.focus();R();}}
function R(){if (nowX<=limitX){P.moveTo(nowX,nowY);
P.focus();nowX+=increment;T=setTimeout("R()",speed);
}else{clearTimeout(T);nowX=limitX;P.moveTo(nowX,nowY);P.focus();U();}}
function U(){if (nowY>=M){P.moveTo(nowX,nowY);P.focus();nowY-=increment;
T=setTimeout("U()",speed);}else{clearTimeout(T);nowY=M;
P.moveTo(nowX,nowY);P.focus();L();}}
function L(){if (nowX>=M){P.moveTo(nowX,nowY);P.focus();
nowX-=increment;T=setTimeout("L()",speed);}else{
clearTimeout(T);nowX=M;P.moveTo(nowX,nowY);P.focus();}}
</script>


3.
Open the screamer.html page with your notepad or html editor and find

Code
<bgsound src="screamer.wav" loop="-1">


now change the screamer.wav to http://yoursite.com/screamer/screamer.wav


Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Trash » No-Right-Click Script
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers