Skip to content

Instantly share code, notes, and snippets.

View idodidodi's full-sized avatar

Ido Ayal idodidodi

  • Israel
View GitHub Profile
@FelipeBudinich
FelipeBudinich / disable-context-menu.html
Last active February 18, 2022 10:24
Javascript, Disable context menu on right click
<!DOCTYPE html>
<html>
<head>
<title>Javascript, Disable context menu on right click</title>
<script type="text/javascript">
if (document.addEventListener) {
document.addEventListener('contextmenu', function (e) {
e.preventDefault();
}, false);