SHOW:
|
|
- or go back to the newest paste.
1 | <script language=JavaScript> | |
2 | <!-- | |
3 | ||
4 | //Disable Right Click Script | |
5 | //by atulquest99 | |
6 | - | //http://www.techstrom.info |
6 | + | //http://www.blogtyro.blogspot.com |
7 | ||
8 | var message="Function Disabled!"; | |
9 | ||
10 | /////////////////////////////////// | |
11 | function clickIE4(){ | |
12 | if (event.button==2){ | |
13 | alert(message); | |
14 | return false; | |
15 | } | |
16 | } | |
17 | ||
18 | function clickNS4(e){ | |
19 | if (document.layers||document.getElementById&&!document.all){ | |
20 | if (e.which==2||e.which==3){ | |
21 | alert(message); | |
22 | return false; | |
23 | } | |
24 | } | |
25 | } | |
26 | ||
27 | if (document.layers){ | |
28 | document.captureEvents(Event.MOUSEDOWN); | |
29 | document.onmousedown=clickNS4; | |
30 | } | |
31 | else if (document.all&&!document.getElementById){ | |
32 | document.onmousedown=clickIE4; | |
33 | } | |
34 | ||
35 | document.oncontextmenu=new Function("alert(message);return false") | |
36 | ||
37 | // --> | |
38 | </script> |