SimoneChecchia

RDG - Disabilitare tasto destro con PopUp

May 29th, 2017
116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script language=JavaScript type="text/javascript">
  2. <!--
  3. var message="Eh. Volevi!";
  4. ///////////////////////////////////
  5. function clickIE4(){
  6. if (event.button==2){
  7. alert(message);
  8. return false;
  9. }
  10. }
  11. function clickNS4(e){
  12. if (document.layers||document.getElementById&&!document.all){
  13. if (e.which==2||e.which==3){
  14. alert(message);
  15. return false;
  16. }
  17. }
  18. }
  19. if (document.layers){
  20. document.captureEvents(Event.MOUSEDOWN);
  21. document.onmousedown=clickNS4;
  22. }
  23. else if (document.all&&!document.getElementById){
  24. document.onmousedown=clickIE4;
  25. }
  26. document.oncontextmenu=new Function("alert(message);return false")
  27. // -->
  28. </script>
RAW Paste Data