JavaScript control prevents right clicking in the browser

From , 3 Years ago, written in JavaScript, viewed 50 times.
URL https://pastebin.vip/view/4d1a65f1
  1. <SCRIPT language=JavaScript1.1>
  2. <!-- Begin
  3. function right(e) {
  4. if (navigator.appName == 'Netscape' &&
  5. (e.which == 3 || e.which == 2))
  6. return false;
  7. else if (navigator.appName == 'Microsoft Internet Explorer' &&
  8. (event.button == 2 || event.button == 3)) {
  9. alert("Sorry, you do not have permission to right click.");
  10. return false;
  11. }
  12. else if (navigator.appName == 'Mozillz Firefox' &&
  13. (event.button == 2 || event.button == 3)) {
  14. alert("Sorry, you do not have permission to right click.");
  15. return false;
  16. }
  17. else if ((event.button == 2 || event.button == 3)) {
  18. alert("Sorry, you do not have permission to right click.");
  19. return false;
  20. }
  21. return true;
  22. }
  23. document.onmousedown=right;
  24. document.onmouseup=right;
  25. if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  26. if (document.layers) window.captureEvents(Event.MOUSEUP);
  27. window.onmousedown=right;
  28. window.onmouseup=right;
  29. //  End -->
  30. </SCRIPT>
  31. //javascript/6191

Reply to "JavaScript control prevents right clicking in the browser"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website