What Is Void(document.oncontextmenu=null); ? How To Re-Enable It

What is void(document.oncontextmenu=null); ?

Have you ever gone to a website and noticed that you are not able to copy any kind of text there at all? No matter how hard you try it feels impossible to copy it. We have all been there and no, it is not your system or browser’s problem. Usually to protect their content from theft and copying what these websites do is that they disable copying of any sort of content from their page or site. This gives them massive protection. The void document oncontextmanu null is a javascript that can be used to overcome this problem of yours. In this article, we are going to look at ways in which this can be solved.

Saving the webpage

This is probably the easiest solution and will work with a lot of websites that disable copying. All you need to do with save the page as HTML and it’s done. Whenever you open the saved page in your browser next time, you will be able to copy whatever text or code you want anytime. This is very useful if you want to copy multiple pieces of text. It would be best if you tried this trick with only chrome or firefox as you encounter some kind of error if you try it on internet explorer.

Enabling right-click option on websites that block it

To protect the content the administrator of the website usually uses an HTML code or javascript code to disable any kind of right-click option on the site that disables you from copying the content on the site. But there is a simple solution for this and that is where Void document oncontextmenu null comes in. Whenever you go to a website paste “void oncontextmenu null” to the URL on top and you will be able to easily copy whatever is on the site. The only con with this method is that you have to paste this every time you visit the site to copy something. This trick works with a wide range of websites and is also the most well known.

Disabling Javascript

Mostly the administrators of websites use Javascript to protect their content which does not allow you to copy. If you disable Javascript altogether then you won’t face such problems. 

In Firefox browser

  1. Open a new tab and type ‘about.config’
  2. Now search for Javascript
  3. Once you find it double click on ‘javascript. enabled’. This makes the statement false and all Javascripts will be disabled

In Chrome browser

  1. Go to Chrome settings by clicking on the settings on option on the top right corner of the tab
  2. Now go to privacy and security options, go to content settings under that
  1. Go to the Javascript option and disable it by turning off the toggle.

Using a plugin

It is not really advisable or recommended to disable javascript altogether and that’s why you should use a browser plugin that will disable javascript temporarily and allows you to copy whatever you want. Depending on your browser search for the plugin. Use keywords like ‘best click’ to make your search easy. There will be lots of search results but select the appropriate plugin according to your need and reviews provided. It is best to stay in the top ten search results.

Going directly to the source

Now, this method is simple yet a little complicated. Using ‘void document oncontextmenu null’ is a great option but you know what would be better? Copying it directly from the source of that page. How do you do it? Very simple. When you are on the site just press Ctrl + U and in the next tab all the codes of the site will open. You can easily copy whatever text you want from it easily. The only hard work here is that if the page has lots of code it will be a little tough for you to scour through all of them

Conclusion:

In this article, we do not support piracy or stealing content but sometimes you may need those particular quotes or codes badly and these methods can come in handy for you. All the methods here including “void document oncontextmenu null” are tested so you need not worry about anything. We highly recommend you to stick with the methods listed on this page as these are safe and secure and do not inflict any damage to the browser in any way.

Leave a Comment