Advertisement
SimoneChecchia

RDG - Disabilitare tasto destro su immagini

May 29th, 2017
189
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.24 KB | None
  1. <script>
  2. document.oncontextmenu = function(e){
  3.     var target = (typeof e !="undefined")? e.target: event.srcElement
  4.     if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
  5.         return false
  6. }
  7. </script>
Advertisement
RAW Paste Data Copied
Advertisement