How to copy a picture that won't allow you to right click

Written by kevin lee
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to copy a picture that won't allow you to right click
If a site won't let you right-click an image, copy it another way. (Katrina Wittkamp/Stockbyte/Getty Images)

The Internet contains millions of pictures that you can copy for free. Browsers have context menus that allow you right-click image files and save them to your hard drive. To prevent this from happening, some Web developers use JavaScript functions to protect their images. When you right-click such a page, a message will tell you that the right-click is disabled. You can bypass that message and save any picture that you like by using your own JavaScript function.

Skill level:
Easy

Other People Are Reading

Instructions

  1. 1

    Visit a website that prevents you from right-clicking a picture.

  2. 2

    Copy the following JavaScript code:

    JavaScript:function $vrc$$() {

    document.onclick=null; document.oncontextmenu=null; document.onmousedown=null;document.onmouseup = null;

    }

    void ($vrc$$());

  3. 3

    Click the URL in your browser's address bar. The browser will highlight the URL.

  4. 4

    Right-click the highlighted URL and select "Paste." Windows will paste the text into the address bar.

  5. 5

    Press "Enter." The browser will execute the JavaScript command.

  6. 6

    Right-click any picture on the Web page and select "Save" to save the picture.

  7. 7

    Press "F5" to refresh the page.

Tips and warnings

  • The JavaScript code temporarily deactivates the Web page's mouse events. Pressing "F5" reloads the page and restores the page to normal. Save the JavaScript code so that you can paste it again when you need it. You can also store it in a browser bookmarklet. This will allow you to access it quickly.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.