Re-Enable Right-Click When Web Pages Turn It Off

Contributor Icon Contributed by AlexTheBeast Date Icon July 7, 2004  
Tag Icon Tagged: HTML

Several web pages turn off the ability to right-click. This examples how to turn it back on.


People are nuts about protecting their web site from unauthorized copying. One of the most frequently used ways to preventing copying is to use javascript to disable the ability to right-click.

Of course, we can use javascript to turn it back on.

When visiting the offending website, type the following into the URL bar of your browser:
javascript:void(document.oncontextmenu=null)

This example works against this page for example:
www.users.totalise.co.uk/~bigoleg/javascript/javascript_disable_right_click.html

If a dialog box opens whenever you right-click, could can often get around it by the following sequence:
Hold the right mouse button, hit enter to close the dialog box, and then release the right mouse button.

This example works against the following web site, for example:
www.cof.orst.edu/net/software/web/html/disable_rtclick.htm

Disclaimer:
Copying websites is not cool… but disabling right click isn’t either.

Previous recipe | Next recipe |
 
  • dfghkrjghgh
    Excellent post. After reading it, I tried "right mouse click and hold" wait a few seconds and then release. Worked fine when no pop-up window appeared.
  • AlexTheBeast
    Sweet. Glad you enjoyed it! Welcome to the site.
  • Erdal Gulbahar
    i tried. it is functioning...
  • drac
    Hi. I need to enable the right click but what I want to copy is an enlargement of something on the web page and when it opens the address line disappears. What to do?? Is there any hope?
  • juddweeks
    <ul id="quote">Disclaimer:
    Copying websites is not cool... but disabling right click isn't either.</ul>

    In the old days, we used to say "Theft is the highest form of flattery."

    -judd
    www.juddweeks.com
  • Anonymous
    Cheers ears. The hold down & enter worked great!!
  • dman
    Most sites that disable right-click also disable the URL bar, so there is no place to enter the text you recommend.
    Know how to prevent the URL bar from being suppressed?
  • Vipin
    Thats what exactly my prob was... i dont have a printer in my home and no internet at workplace... so it was creating difficulty for me while purchasing tickets online... the print screen trick doesn't help coz... it does not copy the whole ticket.... but the right click + enter helped me to copy it and to paste it in MS Word
  • asdfsdaf
    any easy way to copy an image/document/enlargement etc. is to hold ctrl and presss 'print scrn' (to the left of f12). it copies the screen so you can view it in paint etc (just paste it into paint or word etc)
    :roll:
  • Unknown
    Disabling right click should only be used if there is sensitive information you do not want people to know about.
  • Hotdog
    <ul id="quote">
    Unknown wrote:
    Disabling right click should only be used if there is sensitive information you do not want people to know about.</ul>

    That's a strange comment, given how easy it is to re-enable right click (and use other methods to get the info) and given that if it's sensitive, what's it doing on a publicly accessable web-server!

    Anyway - this is a cool forum, just discovered today :)
  • me
    download mozilla firefox, if you didnt already know its a cool web browser, you can change the theme so it looks any way you want it to, and it has extensions which are little addins you can download, one of these extensions is called allow right click 1.1 and it does just that allow you too right click, every once in a while a right click not allowed box will pop up on a site but i can still right click, heres the website you can download it at http://extensions.roachfiend.com/index.php just download firefox from www.mozilla.com then install that allow right click and ur all set to go.
  • newbiexx
    hmm i got this site that the dialog box will only come up afer u click the right click. unlike the other site where u just click click down and dont have to left go, the box comes up. the site i'm at, the dialogue box will only appear after u left go of the right click. any ideas how i can by pass this?
  • Cyzahhe
    Nope.. sorry.. all sounds real easy, but it's totally NOT working for me :(

    I don't even want to copy anything.. just want to use the right-click to open a link on a website in a new window, which I've been told is possible.. but not <grrrrr> if your mouse isn't cooperating :

    What I did: went to www.google.com, searched for something.. then say I want to go to the first item that comes up, but in a new window.. I'd need the right-click function. So I copy-pasted "javascript:void(document.oncontextmenu=null)" into the URL bar..... right-click still didn't work. I also tried copy-pasting and hitting Enter...... still nothing.

    Should I chuck my mouse.. or the computer.. or am I overlooking something majorly simple and do I need to go find myself a new brain? :)

    Greetz and thanx.. provided someone can help me, that is ;)
    Cyz
  • Anonymous
    Hello All

    I have been trying to use the right click enable method for when you get a dialogue box. This is not working

    The web pages I am trying to right click open in a seperate window with out all the tool bars at the top so I can not use the booklet option.

    The web pages also have the select all function (ctrl a) disabled and the ability to high light any text.

    Is there any way round this?

    if it helps the dialogue box opens and says in it "illegal action Report 334 compiled"

    If there is any body out there that can help me I would love to hear from you please

    Regards
    Chris
  • anony-mouse
    <ul id="quote">
    Unknown wrote:
    Disabling right click should only be used if there is sensitive information you do not want people to know about.</ul>

    Gee, if the information is "sensitive", then why would you publish it on the Internet? By its very nature, publishing something is the very definition of turning a private thought into a public one.

    Anyone trying to hide something from me only challenges me to then get at that something. It becomes a game. "You cannot have this data!" they challenge. "Yeah right." I reply.

    Don't forget that any information your browser has, you have. Delete your browser's cache, visit the page, farm your cache for the HTML. Voila. Problem solved. Oh, but the webmaster has client-side encoded everything? Save the cached HTML file somewhere on your hard drive, edit the HTML to do a JavaScript alert() function to display the decoded HTML. Simple.

    That's why I have been a fan of the don't-send-the-good-stuff-to-the-client approach for many years now. Use server-side logic to track the interesting information and stop sending mission critical data to the browser. If you worry that somebody's going to rip off your website in its entirety, code up some form of "secret sauce" that holds key functionality that allows everything to work but which itself can't be downloaded (a server-side DLL or EXE). But stop trying to protect your HTML and style information since you probably ripped it off of somebody else, right?

    From what I've seen the people who are trying to hide their HTML are the ones who 1) are doing something they shouldn't be like gathering marketing data silently from their users, 2) trying to hide the fact that their HTML was ripped off from somebody else, 3) trying to deliver some adware/malware to the browser, 4) trying to hide their server's identity to avoid prosecution for spamming or other illicit practices like credit card fraud. And then when I find out what that activity was, I forward what I find to the authorities or to their hosting provider and they take the necessary actions.
  • MataHari303
    There are several ways around this..I like the PrtSc method, but another easier way, to get just one item, is to click File>New>Window. A new (duplicate) window opens with the same items. you can usually right click and copy the item you need, if you are fast! If the no right click appears again, keep opening a new window, and be fast about copying your item.
  • Anonymous
    Don't ask me how I discovered this - I am NO web guru!

    Going back to the earlier idea of using the following in your address bar:

    <ul id="quote">javascript:void(document.oncontextmenu=null) </ul>

    If there is no address bar because the item is opened in a new window, press f11 for a full screen and an address bar appears telling you where you are.
    Simply paste in the javascript, press enter, and you have right-click re-enabled!!!!!

    This worked for me when trying to get at a picture of a guitar I have ordered for my son, I hope it works for everyone else as well.

    By the way, I'm new here so if it doesn't work, please go easy on me!!!
  • AlexTheBeast
    <ul id="quote">
    Mick_Fish wrote:
    Don't ask me how I discovered this - I am NO web guru!

    javascript:void(document.oncontextmenu=null)

    If there is no address bar because the item is opened in a new window, press f11 for a full screen and an address bar appears telling you where you are.
    Simply paste in the javascript, press enter, and you have right-click re-enabled!!!!!
    </ul>

    You rock. I love it. I'll either post this in our blog or as a new recipe soon. Good find.
  • Anonymous
    This does not work completely. Right-clicking is pointless if you can't view source. Why else would you need to right-click?

    Try this on Google Groups:

    Link
  • Anonymous
    I've noticed that on many webpages that disable right-click, they don't program it properly, and I've found the following loophole. Since no websites block the left mouse click, as it's the only way to go to another link on the site, you press down on the left mouse button first, and, while holding down the left mouse button, press down on the right mouse button, and then release the left button first, followed by the right button. The right-click context menu should appear. There are some sites that protect against this, but not very many.

    Happy Clicking.

    BTW -- To Cyzahhe(sp?) who was simply trying to open links in a new window...in IE, just hold down SHIFT when you click on a link. In Firefox, hold down CTRL while you click, and it'll open a new tab.
  • jason112345
    i luv this fookin site!!!!
  • neo
    Try this program it will allow you to get images from sites that disable rigth clicking.
    http://www.system7software.com/ProductInfo/Righ...
  • risherz
    <ul id="quote">This does not work completely. Right-clicking is pointless if you can't view source. Why else would you need to right-click?

    Try this on Google Groups:

    </ul>

    Well Sorry for the extremly late reply (well not actually a reply, lol)... I wonder why I didn't notice this earlier... but it is possible to view souce code for google groups and other similar sites where the source code window is blank...

    If you are using IE you just right click and click on "View Source"...

    If you are using Firefox- Right Click > Select All > View Selection Source. And that should do the trick for the sites that don't show the source code when you just right click on them and click on View Page Source.

    Hope this helps the people who want to view source codes (althought it isn't good to copy it) :D
    Risherz
  • Anonymous
    Glad I found this site. I have tried all of the above suggestions and I have not found anything to work. I am using firefox. I enjoy listing to various webcasts, but I usually download them to my computer so I can listen to it on MP3 later. There is a website with webcasts available to listen to 24/7 free but only allow you to listen to it at your computer. When I view the selection source I can see they have disabled right click. I copied it below. I removed some of the head tags so I could post it here.

    html><head><title>Internet Radio : Audio On Demand</title

    script type="text/javascript" src="../_includes/disable.righclick.js"></script
    style type="text/css"

    So I can not even see the URL they use for the webcast so I can download and listen to it later. Any ideas of how I can find the URL source of the webcast so I can listen to it? Please feel free to email me at mountv@gmail.com
  • davak
    Post the name of the site with an URL.
  • risherz
    <ul id="quote">
    davak wrote:
    Post the name of the site with an URL.</ul>

    Yup... URL and name of site is very very important.

    Hmm... I think what you are trying to do is trying to download a streaming audio or something. Since you mention 24/7 and listen to it only are your computer... I think it might be streaming... which means that it is new everytime and you can't download it... :( . However you might be able to listen to it online and if you can listen to it online then you can record the streaming audio and listen to it later at some other time or put it on your MP3 player. The other webcasts that you are talking about are probably "podcasts" which are for your MP3 player which you can download.

    Are you trying to listen to it online? Or trying to download it and put it into your mp3 player or listen to it later on your computer ... since it is 24/7?

    Hope this helps :D
    Risherz
  • Anonymous
    Hi,

    I want to RIGHT CLICK something from this website:

    libertins35.com

    Moderator Edit:
    - No porn links allowed.

    You have to enter the website and than you are getting in in a PHP something.
    From that moment on, you CANNOT right click anymore.

    There is also a MEMBERS part (you have to pay for it, I did and I can provide a code), and everytime you select a picture, you cannot right click it. You don't even get a warning: nothing is happening.

    Who can help me out with this? If you can make me RIGHT click on the pictures I will give you an award of $ 25 via PAYPAL.

    contact: couplecocu@amateurslet.net


    Greetz!
  • Anonymous
    I have rewarded (I did send 25 US $) the man who helped me out with this (F11 + sending an e-mail), so I'm out of this.

    I have another problem:

    I want to RIGHT CLICK pictures on this site:
    chezcoquinette.com/index03.html

    Moderator Edit:
    - No porn links allowed.

    I have tried the javascript:void(document.oncontextmenu=null) thing and I have tried to copy via F11 + mailing the pictures, but nothing is working. Who can help me out?



    Another problem: I am a MEMBER of a website where all of the pictures are in FLASH. There are about 3000 pictures on that website, but I cannot copy any of these.


    WHO can help me out ???


    Please POST or send me an e-mail (I can provide passwords) to help me with these 2 new problems.


    Thanks
  • anonymouse
    why don't you just disable the javascript option in your web browser.
  • Anonymous
    Thanks for everyones responses about this. Here is the URL below. When you click on 24 webcasts, a new window will open up for you to choose which webcast you want to listen to. Right now there is only one, but I would like to be able to download and upload to MP3 and listen to it in my car. Thanks.
    Here is the URL:
    http://www.thepottershouse.org/webcast_radio.html

    mountv@gmail.com

    PostPosted: Sun Dec 11, 2005 9:45 am Post subject: Re: Help with disable right click
    davak wrote:
    Post the name of the site with an URL.


    Yup... URL and name of site is very very important.

    Hmm... I think what you are trying to do is trying to download a streaming audio or something. Since you mention 24/7 and listen to it only are your computer... I think it might be streaming... which means that it is new everytime and you can't download it... Sad . However you might be able to listen to it online and if you can listen to it online then you can record the streaming audio and listen to it later at some other time or put it on your MP3 player. The other webcasts that you are talking about are probably "podcasts" which are for your MP3 player which you can download.

    Are you trying to listen to it online? Or trying to download it and put it into your mp3 player or listen to it later on your computer ... since it is 24/7?

    Hope this helps Very Happy
    Risherz
  • Anonymous
    it´d be interesting too to know how to re-enable left click or the copy, select function, there are many pages that don´t let you to drag the cursor over a text, so you can´t use the left button, while the right is enabled, very useful if we know that......

    happy day to everybody!
  • Anonymous
    My question is slightly different. You go to a web page that disables your clipboard and you can't copy anything, not even from another page or another program. It disables the clipboard for your whole computer. How can I re-enable the clipboard without closing that page. I have a tutorial group and I am often trying to copy-paste links to the tutorials so I don't want to close down that website first. Plus if I am using my tabbed browser, I may have tons of windows open and have a hard time finding which one is the offending one. Can anyone help?
    Thanks in advance!
    Hugs, Ellie :?:
  • davak
    This is likely done through javascript. Try disabling it and see if it helps.

    Davak
  • Anonymous
    <ul id="quote">
    davak wrote:
    This is likely done through javascript. Try disabling it and see if it helps.

    Davak</ul>
    Thanks for your reply Davak. I just found that opening those pages in Firefox allows me to have them open and still have the use of the clipboard.
    Hugs, Ellie
  • davak
    Good ole Firefox. Once again it comes to the rescue. ;)

    Welcome to the site.

    Davak
  • Anonymous
    I made this account just for the sake of asking for help. I'm trying to save a picture. But when i click on it, it comes up in a window with no address bar or anything (and yes i tried that f11 thing) I've tried like everything, and it's really starting to get on my nerves. I also tried that javascript in the address bar when i clicked f11 and that still doesn't worked, i think the person disabled the url bar also.

    I've never had so much trouble getting a picture, if you can help please contact me at

    my email;
    ownerofallbishies@gmail.com
    (b/c i'm too lazy to check on here every 5 minutes, lol.)
  • Anonymous
    For Firefox users:

    To allow right-click, go to Tools --> Options --> Content --> Look for "Enable Javascript" and click the "Advanced" button next to it --> Uncheck "Disable or Replace Context Menus".

    Problem should be solved. Let know if it isn't. :-)
  • ihacktheworld
    One other thing you could do in relation to the second scenario
    is instead of clicking and holding right click
    just hit SHIFT + F10 and it will open the right click menu
  • yeba
    you are a god
  • Peter
    Sweet!
    I tried: "javascript:void(document.oncontextmenu=null)" now I can right click! This is cool! Thanks!
    However, I am still not able to copy any text in the webpage!
  • jon
    Another way websites try to prevent right click is by placing a transparent .gif directly over an image, so that when you right click and hit save, it saves a blank file. this can be averted by ad-blocking the offending .gif and refreshing the page.
  • odball
    great trick many thanx
  • Pissed Guy
    Hi, i stumbled upon this site yesterday and I couldn't but sharing my experience.

    There is this site that provide free wallpaper [NOT PORN !!] download for registered user. After registered, I start browsing for wallpaper (browsing for wallpaper only meant for registered user). When i clicked at the wallpaper image, a new window open with full size wallpaper preview. Then, as usual I right click to save the image. To my suprise, the window immediately closed. Now, I'm pissed.

    So i tried this java trick and i got like "user being banned permanently and my IP address displayed". Okay now I'm really really pissed.

    Then I remember that i had this good FIREFOX extension called "SCRAPBOOK" that used to capture a webpage. Yes, It worked. The preview window was captured and I re-open the captured page to save the wallpaper. i should call it Superfox since it always saves me when i'm in some trouble.

    I wonder why they would do such thing if they wan to provide free wallpapers. I can accept the register thing but not being able to download wallpaper is way out of line. If they don't want to share their precious wallpaper then don't say its FREE or don't even bother uploading those images.
  • LukeNewb
    Hold the right click down did the trick! You haxxor!
  • Udaya
    Great. The trick "right mouse click and hold". I have to add one more thing.when we do this trick I did like bleow.
    right mouse click and hold and move to the messege.then dont unhold the right mouse click and click the ok button with left click.Then messege disapear.Then release the right mouse click.Now you can see the property box.
    try it.
    thanx.
  • prakash
    great !!!!! it works..and i m happy now :>)
  • Ryan
    This is awesome, thanks.

    I added the javascript as a bookmark, so I can just click the bookmark and have my right click back.
  • ali
    its works....
  • Sean
    Fact is, of course, the content is usually automatically copied. All you have to do is rummage through the cache.
  • MELANIE NEWMAN
    CANNOT ENABLE RIGHT CLICK
  • TDZ
    As the developer of multiple Social Networking Websites, I utilize a right click disable for 2 reasons, 1 is as you stated, to keep people from stealing work. But that is really become a useless means as more and more hackers find ways around it. The 2nd reason was to protect the media of my members that others choose to steal and create fake profiles with it.

    With the development of browsers such as Firefox and their add on tools, the issue has less to do with people stealing code now as it does to detering the average person from stealing the photos/video/audio files that belong to the members and sites.

    As far as claiming that locking down a site is not cool, it's also not cool to spend months developing a site option to have someone else come in and take it without paying for it. Would you go into a store and just take a watch without paying? I think not but that is all to often what people seem to think they can do on the internet.

    Thanks for the tips you guys are using though to bypass the right click disable and help us circumvent it. Now, where did I put that little .htaccess file?
  • jimattn
    See Also This Site . . .

    http://javascript.about.com/library/blright.htm

    There is an easy to use java script you can save to your 'favorites' folder.
    Any time you run across a web page that has right click disabled, simply
    click on the script you saved to your favorites folder and ... there you go.

    Right Click Is Enabled for as long as you stay on that page!

    NOTE: This is not my script. I simply found it using google and it works
    great for me. Thought I'd share it with others. Hope it works for you too.
  • jiminme
    What is YOUR suggestion concerning the protection of a web author's intellectual property if disabling right click "isn't cool"?
  • cat
    If you find that nothing happens when you right-clickhold down the Ctrl key while you click on a webpage, it is a known issue caused by the Yahoo! Toolbar for Firefox.

    Yahoo!® has been contacted about this issue.

    For now, disabling the Yahoo Toolbar add-on will prevent this issue.

    1. At the top of the Firefox windowOn the menu bar, click on the Tools menu then select Add-ons, to open the Add-ons window.
    2. Select the Extensions panel.
    3. In the list of extensions, select the Yahoo! Toolbar, and click Disable.
  • ZDarkness
    It's more interesting to allow right click at any site altering fire fox config.

    about:config
    find: contextmenu

    double click on it, it's done.
blog comments powered by Disqus