There are a number of sites that disable the right-mouse clicks to with the intention to prevent the theft of their web page content. A no right click restriction is implemented by manipulating the event objects in JavaScript.

All the scripts that I have seen, disable access to the browser context menu that is activated by a right-click. The main objective is to prevent the users from selecting the ‘View Page Source’ option in the context menu. But many people do not realise that the page source can be viewed by other means.

In Firefox, the keyboard shortcut, Ctrl-U, will open the page source window. Alternatively, there is also a ‘Page Source’ option under the ‘View’ menu in Firefox.

One way to disable the no right click restriction is to totally disable JavaScript. But this may interfere with the navigation of the site.

Another way is to run the following JavaScript code from the browser’s address bar and hit enter.

javascript:void(document.onmousedown=null);void(document.onclick=null);void(document.oncontextmenu=null)

The following two tabs change content below.

Mohamed Ibrahim

Ibrahim is a Telecom Engineer by profession. A technology enthusiast with great interest in open source projects.