document.addEventListener('contextmenu', event => event.preventDefault());
This code adds an event listener to the
contextmenu event, which is triggered when the user right-clicks on the web page. The
preventDefault() method is called to prevent the default behavior of the event, which is to display the context menu.