• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Disable Copy Paste

#1
Hello, quests is stealing my forum documents all time. I trying disable RIGHT CLICK and CTRL + C

I find it this code, but i cant use this. Anyone can help me there?

Code:
function noMenu() {  return false; } // its right click event  function disableCopyPaste(elm) {  // Disable cut/copy/paste key events  elm.onkeydown = interceptKeys   // Disable right click events  elm.oncontextmenu = function() {  return false  } }
function disableCopyPaste(elm) {
        // Disable cut/copy/paste key events
        elm.onkeydown = interceptKeys
     
        // Disable right click events
        elm.oncontextmenu = function() {
            return false
        }
    }
 
    function interceptKeys(evt) {
        evt = evt||window.event // IE support
        var c = evt.keyCode
        var ctrlDown = evt.ctrlKey||evt.metaKey // Mac support
 
        // Check for Alt+Gr (http://en.wikipedia.org/wiki/AltGr_key)
        if (ctrlDown && evt.altKey) return true
 
        // Check for ctrl+c, v and x
        else if (ctrlDown && c==67) return false // c
        else if (ctrlDown && c==86) return false // v
        else if (ctrlDown && c==88) return false // x
     
        // Otherwise allow
        return true
    }

And body tag:
<body oncontextmenu="return noMenu();" onkeydown="return disableCopyPaste();">

Thanks!
 
F

Floris

Guest
#2
Completely useless.

Everything that's rendered client side is visible, disabling javascript would void your protection.
 

borbole

Well-known member
#3
Hello, quests is stealing my forum documents all time. I trying disable RIGHT CLICK and CTRL + C

I find it this code, but i cant use this. Anyone can help me there?

Code:
function noMenu() {  return false; } // its right click event  function disableCopyPaste(elm) {  // Disable cut/copy/paste key events  elm.onkeydown = interceptKeys  // Disable right click events  elm.oncontextmenu = function() {  return false  } }
function disableCopyPaste(elm) {
        // Disable cut/copy/paste key events
        elm.onkeydown = interceptKeys
   
        // Disable right click events
        elm.oncontextmenu = function() {
            return false
        }
    }
 
    function interceptKeys(evt) {
        evt = evt||window.event // IE support
        var c = evt.keyCode
        var ctrlDown = evt.ctrlKey||evt.metaKey // Mac support
 
        // Check for Alt+Gr (http://en.wikipedia.org/wiki/AltGr_key)
        if (ctrlDown && evt.altKey) return true
 
        // Check for ctrl+c, v and x
        else if (ctrlDown && c==67) return false // c
        else if (ctrlDown && c==86) return false // v
        else if (ctrlDown && c==88) return false // x
   
        // Otherwise allow
        return true
    }

And body tag:
<body oncontextmenu="return noMenu();" onkeydown="return disableCopyPaste();">

Thanks!

Try this:

Disable right click for guests on your forum
 

melbo

Well-known member
#5
Use tynt.com and at least have a chance at getting a linkback to copied text.
Personally, I never return to a forum that has attempted to restrict the use of my mouse buttons.
 

bambua

Well-known member
#6
Tynt is really pretty nice, gives you some good insight into what people are doing, and at least gives you a chance at a link back without annoying your guests.