1document.addEventListener('contextmenu', event => event.preventDefault());
1// for disabling right click use this as it is
2document.addEventListener('contextmenu', event => event.preventDefault());
3event.preventDefault()
1document.oncontextmenu = document.body.oncontextmenu = function() {return false;}
2