Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 21st, 2012  |  syntax: None  |  size: 0.74 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function killCopy(e){
  2. return false
  3. }
  4. function reEnable(){
  5. return true
  6. }
  7. document.onselectstart=new Function ("return false")
  8. if (window.sidebar) {
  9. document.onmousedown=killCopy
  10. document.onclick=reEnable
  11. }
  12. function nrcIE() {
  13.         if (document.all) {
  14.             return false;
  15.         }
  16. }
  17.  
  18. function nrcNS(e) {
  19.         if (document.layers || (document.getElementById && ! document.all)) {
  20.             if (e.which == 2 || e.which == 3) {
  21.                 return false;
  22.             }
  23.         }
  24. }
  25.  
  26. if (document.layers) {
  27.     document.captureEvents(Event.MOUSEDOWN);
  28.     document.onmousedown = nrcNS;
  29. }else {
  30.     document.onmouseup = nrcNS;
  31.     document.oncontextmenu = nrcIE;
  32. }
  33. document.oncontextmenu = new Function("return false");