How to disable Right-Click

Due to popular demand, here is how you do it.  Under the disclaimer that we think this is a complete waste of time, and all it will do is remove real, existing, helpful information found in the browser right-click menu, below is the code.  Also, great article against doing this:
http://www.sitepoint.com/dont-disable-right-click/

Under Design > Developer > Custom Javascript

$(document).ready(function() {
	$(document).bind("contextmenu", function(e) {
		return false;
	});
});

Also, to disable tablet/phone context menus (for any webkit browser like iOS):
Under Design > Developer > Custom CSS

.main img {
	-webkit-touch-callout: none;
}
Have more questions? Submit a request

9 Comments

  • 0
    Avatar
    Bill Wells

    I'm not sure if this a good thing or bad thing.  It appears to me that the people/person from link (sitepoint) are not photographers who have their work stolen on a regular basis.  As an example their article states something like "people will find it offensive if they get a copyright popup...", this is so far from the truth, I know I talk to my clients as well as other clients.  At this point there is NOT a good solution.  I do know for a fact that disable right-click helps increase sales for event photographers.  Watermark doesn't help.  I've seen many heavily watermarked images on facebook pages.  If you shoot High School Events (Sports, Proms, Graduation, Senior Pictures, etc...) and they can copy the images sales will be down.   BTW, in case you are wondering, I didn't disable right click.

  • 0
    Avatar
    michael sablone

    @bill -- i totally read you all the way.  it's just for us, we can't include something like this by default.  if you want it, you can cave it.  but to me, disabling right-clicks are like seat belts on airplanes -- if it makes you feel safer, great.

    i just know it's just not gonna help one bit for anyone who is even remotely determined to steal, to deter them from doing so.  just be aware of the "oh yeah? watch this ... " crowd.  all you have to do is open safari's activity monitor and problem solved -- not only can you take one image, it gives you a handly list of every image on the page.  don't even get me started on plugins like download-them-all or even entire businesses like pintrest.

    at the end of the day, it's the web, and it's open.  this code snippet is here for those who want it, and we're not gonna judge you if you use it or not.  i think this one is a personal preference.

  • 0
    Avatar
    Thestudio

    Well said, Michael. If people want to take an image, they will do it. Great extra to have if someone wants a little extra protection. :)

  • 0
    Avatar
    Oscar

    im having a hard time editing the Custom Css and Java script

  • 0
    Avatar
    Brian Krecik

    Perhaps the easiest way is to only offer images that are 700 pixels or smaller at 72 dpi.  People are welcome to steal these, but they won't have the 240 dpi 6000+ pixel images. Just a thought - of course this counters the need to have our work appear large but part of me feels that if the client can't see your skill in a 700 ppi image then a 2000 ppi image won't help you one bit.

    Brian

  • 0
    Avatar
    MARTIN LAM

    Thank you for the code Michael. I put my seat belt on all the time on flight, so you know what kind of person I am. Nothing uncomfortable, just feel better and safer.

    Well here's another question: I have the code installed, but I can still right click (extended tab) on my iOS device , any way to solve this issue?

    Cheers,
    Martin 

  • 0
    Avatar
    michael sablone

    @martin -- i looked this up, and there is a way, but it also disables all touch events on the site.  the long press is a construct of the phone, not the browser, and in order to stop the long press window you need to essentially trick the site into thinking it uses gestures, and then essentially doing nothing with them.

    i think the tradeoff might be too great.  but i am still digging around.

  • 0
    Avatar
    michael sablone

    @martin et al, i did do some more research, and turns out it's not a javascript thing at all, it's a css thing.  i have updated the code at the top of the page to reflect the changes you need to make to prevent the bookmark menu.  let me know how it goes!

  • 0
    Avatar
    MARTIN LAM

    @Michael

    Thank you for your research and work!

    I tried adding the code into custom CSS field, remove all cookies and cache, restart iOS safari and load the site again, and the menu still pops up after long press..... 

     

    I have another two css code for disabling the time bar and album arrows, anything to do with these two?

    Seems we will need more time to do experiment on this issue.
     

Please sign in to leave a comment.
Powered by Zendesk