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
#2
(10-12-2009, 02:27 AM)danger Wrote: Hello everyone this is a small javascript that will save you site from being copied.

It's not, yes the right click is disabled but you can still view the Source code with CTRL+U in FF

But thanks it's a nice script
Reply
#3
thankx.


tahnx
Reply
#4
Thanks alot. I've been searching it for such a long time.
Reply
#5
Cant stop code from being viewed. This just makes it a little harder is all.
The Rules!
FTW Forum <-- Home of the Damned! --> Join me On MM


Reply


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: 3 Guest(s)