Jump to content

How can I override the browser's right-click settings?

Recommended Posts

  • 3 weeks later...
  • Replies 32
  • Views 83k
  • Created
  • Last Reply
  • 4 weeks later...
  • 1 year later...
  • 8 months later...
  • 2 months later...
  • 3 months later...

I figured out how to get rid of the annoying Alert message. Just inject this header code:


<script language=JavaScript> var message=""; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("return false") </script>

You are very welcome ;)

Link to comment

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.