Have you ever come across a website where the right click does nothing or even worse, pops up an annoying dialogue box that tells you that "Right click is disabled."? Some websites (mostly outdated ones) use certain methods to disable right clicking with hopes that this will stop people from stealing the images or texts from their websites. I am not claiming that it is okay to steal images or texts or other content from a website, but disabling the right mouse button entirely seems to me as being a little disrespectful to the user, while providing little protection from someone who is determined to steal the content. Luckily, there is an easy way to bypass this annoying "protection".
To have this code ready anytime we come across a right click disabled website, we can even create a bookmark which activates this code. To do that, we go to the bookmark manager of our browser and select "Add Bookmark". As a name, we write "Re-enable Right Click" or anything that will remind us what this code does. For the address, we enter the above code. Now, when we find ourselves in a right click disabled website, all we have to do is to visit the bookmark that we have just created and we will have our right click back.
To conclude, I am including links to some right click disabled websites so that the functionality of this code can be tested: