Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable Right Click
#1
Hello everyone this is a small javascript that will save you site from being copied.
Code:
<script>
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
  if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
  function mischandler(){
   return false;
}
  function mousehandler(e){
    var myevent = (isNS) ? e : event;
    var eventbutton = (isNS) ? myevent.which : myevent.button;
    if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
  </script>

+rep would be appreciable
[Image: 2d75599e9a.png]:superman:
Reply


Messages In This Thread
Disable Right Click - by Akshay* - 10-12-2009, 02:27 AM
RE: Disable Right Click - by Gaijin - 10-12-2009, 02:40 AM
RE: Disable Right Click - by hello - 10-12-2009, 02:49 AM
RE: Disable Right Click - by Chris - 10-12-2009, 11:53 PM
RE: Disable Right Click - by DAMINK™ - 10-13-2009, 12:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Adsense Click Fraud?? Question?? ImFocuzz 5 1,860 06-06-2011, 07:40 PM
Last Post: Black Demon
  WIP: transition : 2 themes in single click [ premium] envira 5 1,290 06-02-2011, 12:35 PM
Last Post: envira
  [TUT] Disable Copy Paste From Your Site Kewlz 26 6,154 04-13-2010, 03:00 PM
Last Post: Anubis™
  Auto Click Button Scorpion 1 1,980 11-06-2009, 09:00 PM
Last Post: Gaijin

Forum Jump:


Users browsing this thread: 2 Guest(s)