HomeGuidesWhat is Void(document.oncontextmenu=Null) & How to Enable Right-Click

What is Void(document.oncontextmenu=Null) & How to Enable Right-Click

-

Are you trying to use several websites to use content by browsing the element inspection via the web browser? If so, you are one of the users to copy some element or code but might encounter some unexpected text or error notice something like ‘Void Document Oncontextmenu Null’. Now, if you’re getting the same kind of issue after right-clicking the menu and nothing appears instead of it, then don’t worry.

Multiple websites have different content with different kinds of theme elements, codes, style elements, and more. And most internet users prefer to copy & paste some codes or functions from that website to another one as a shortcut method. However, in some cases, this trick doesn’t come in handy, and unfortunately, people start getting the error message that says, “Sorry, this functionality has been disabled by the administrator.”

Website owners or admins usually lock their content or minify the codes so that no one can easily copy-paste their data. Because these days the original user or the content creator doesn’t get enough credits or appreciation even after being used by others. Additionally, copy-pasting the same content on multiple websites can also find trouble getting ranking in the search results by popular search engines due to spam or plagiarism.

What is Void(document.oncontextmenu=Null) & How to Enable Right-Click

What is ‘Void Document Oncontextmenu Null’ – Void(document.oncontextmenu=Null); 

As far as we know, Void document oncontextmenu=null is a kind of JavaScript (JS) code that you can use to enable right-clicking on the websites that have turned on the content protection. You can use it by following the method to easily bypass the website’s content protection alert. To do this:

  • First of all, go to the particular website where the content copy is disabled.
  • Now, type the following code in the URL address bar and press Enter:
javascript: void(document.oncontextmenu=null);

It’ll eventually bypass the Javascript (JS) code of the website’s alert and let you allow easily use the right-click menu. That means you can now be able to right-click on the selected content and click on Copy/Paste to add it to another place.

Please Note: However, do keep in mind that this is not a foolproof trick to do the same for all websites. Some website owners or admins are aware of this trick too and they might have enabled some other codes to lock the content which can’t be bypassed using the above code.

Whereas you’ll also need to copy-paste the void(document.oncontextmenu=null); code every time you want to copy-paste the restricted content from any website. So, taking note of this code or remembering the code can be a hassle for some people.

Luckily, there are some other (alternative) ways mentioned below that you can use to enable right-clicking on the website to bypass content protection. Make sure to follow all the methods and check which one works best for you on multiple websites.

1. Try Using Reader Mode

First, you can try using Reader Mode on the web browser to use right-click on websites that have disabled it. Make sure to press F9 to Turn On the Browser Reader Mode. Once done, check if the problem has been fixed or not. If not, you can head over to the next method.

2. Disable Javascript to Turn On the Right-Click Menu

By disabling Javascript codes turn on the right-click menu to disable right-clicking on the content-protected websites. You can easily disable the JavaScript by following the steps below.

For Google Chrome:

  • Open Google Chrome.
  • Click on the three vertical dots icon at the top right corner.
  • Go to Settings and locate Privacy and Security.
  • Click on Site Settings.
  • Go to Content Settings and find JavaScript.
  • Disable it to check for the issue.

For Mozilla Firefox:

  • Launch Mozilla Firefox and open a new tab.
  • Type about: config in the address bar and press Enter.
  • Locate JavaScript in the search preference bar and press Enter.
  • Double-click on the javascript.enabled option and set the status to False.
  • After disabling, you can reload the website, and right-click on the content.
  • Once done, follow the steps again, and revert the javascript status to true.

You should understand that disabling javascript from any website can prevent some files or contents to load properly.

3. Using the Source Code of the Webpage

In case, you’re only interested to use right-click method to copy-paste the content from any website then you can easily go to the Source Code section of the webpage by pressing the Ctrl+U key shortcut. The right-click option shouldn’t be disabled for the source code. So, you can find the content from the source code and copy it from there.

4. Save the Webpage as HTML to Enable Right-Click

Another thing you should do is just to save the webpage on the computer as an HTML file format and then copy-paste the content from that downloaded webpage. Even though the webpage has been downloaded on the PC, it’ll be opened in the web browser due to the HTML file format. So, nothing to worry about it.

5. Try Using Proxy Server to Copy Content

A proxy server works like a VPN service that basically allows you to browse the internet securely and anonymously instead of showing the original IP address or Mac address. Sometimes using the proxy server can also be useful enough to copy content from websites (if the content restriction is enabled and right-clicking isn’t working).

There are some reliable proxy servers that can be found online such as Proxify or FilterByPass that you can use. Otherwise, use any other proxy server whatever you prefer. Just run the proxy server on the computer and open the website from where you want to copy-paste the content. Then right-click on the content and copy-paste easily. Sometimes the website might throw a warning notice.

Just select the Remove Scripts checkbox to disable the feature. And you’re good to go. If the first attempt didn’t come useful, you can reload the webpage & try again.

6. Use Browser Extensions

If the above tricks didn’t do the fix then you can try using the web browser extensions to bypass the right-clicking restriction from any website. However, you might not be able to enable right-click on all websites. Still, you can try it once. To do that:

  • Ensure to open the Google Chrome browser.
  • Head over to the Chrome Web Store.
  • Now, search for Enable Right Click & Copy extension.
  • Install the extension and then open the specific website.
  • Then try right-clicking on the content to check for the issue.

If you’re using Mozilla Firefox, you can do almost the same steps to install the Absolute Enable Right Click & Copy extension. Otherwise, you can also try some other highly rated extensions that claim to enable right-click feature.

This is it for now. If you’re still unable to use the copy-paste content by right-clicking on the content-protected website then you can comment below.

Nick Bilton
Nick Biltonhttps://itechhacks.com/
Nick is a technology writer that lived with computers all his life. He is an eccentric character that writes articles about Windows, Gaming, Android and How To Fixes.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

LATEST