//Disable mouse right click
$("body").on("contextmenu", function(e) {
return false;
});
document.addEventListener('contextmenu', event => event.preventDefault());
// for disabling right click use this as it is
document.addEventListener('contextmenu', event => event.preventDefault());
event.preventDefault()
document.addEventListener('contextmenu', event => event.preventDefault());
// ⇓ Test it (fiddle) ⇓
$("body").on("contextmenu",function(e){
return false;
});
document.addEventListener('contextmenu', event => event.preventDefault());