js to turn off right click code example Example: disable right click document.addEventListener('contextmenu', event => event.preventDefault());