Share Pastebin
Guest
Public paste!

cesurasean

By: a guest | Mar 22nd, 2010 | Syntax: None | Size: 0.90 KB | Hits: 64 | Expires: Never
Copy text to clipboard
  1. <SCRIPT TYPE="text/javascript">
  2. <!--
  3. var message="Sorry, right-click has been disabled";
  4. ///////////////////////////////////
  5. function clickIE() {if (document.all) {(message);return false;}}
  6. function clickNS(e) {if
  7. (document.layers||(document.getElementById&&!document.all)) {
  8. if (e.which==2||e.which==3) {(message);return false;}}}
  9. if (document.layers)
  10. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  11. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  12. document.oncontextmenu=new Function("return false")
  13. // -->
  14. </SCRIPT>
  15. <SCRIPT TYPE="text/javascript">
  16. <!--
  17. ///////////////////////////////////
  18. function disableselect(e){
  19. return false
  20. }
  21. function reEnable(){
  22. return true
  23. }
  24. //if IE4+
  25. document.onselectstart=new Function ("return false")
  26. //if NS6
  27. if (window.sidebar){
  28. document.onmousedown=disableselect
  29. document.onclick=reEnable
  30. }
  31. // -->
  32. </SCRIPT>