JavaScript: Disable Right Click

By Xah Lee. Date: .

Here is how to disable right click.

document.addEventListener ("contextmenu", e => e.preventDefault(), false);
BUY Ξ£JS JavaScript in Depth