Using jQuery for this purpose only is overkill. This will do the trick:
(function () {
var blockContextMenu, myElement;
blockContextMenu = function (evt) {
evt.preventDefault();
};
myElement = document.querySelector('#myElement');
myElement.addEventListener('contextmenu', blockContextMenu);
})();
myElement can be replaced with window.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…