RDG - Disabilitare tasto destro su immagini

SimoneChecchia May 29th, 2017 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. document.oncontextmenu = function(e){
  3.     var target = (typeof e !="undefined")? event.srcElement
  4.     if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
  5.         return false
  6. }
  7. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand