Skip to content

Instantly share code, notes, and snippets.

@zenlor
Last active December 15, 2015 12:49
Show Gist options
  • Save zenlor/5262791 to your computer and use it in GitHub Desktop.
Save zenlor/5262791 to your computer and use it in GitHub Desktop.
$(document).keydown(function (event) {
if (event.ctrlKey) { return false; }
var code = (event.keyCode ? event.keyCode : event.which);
if (code == 17 || code == 224) { return false; }
});
$(function () {
$("body").bind('mousedown', function (event) {
if (event.target.id != 'ctl00_HeaderBox_header_TextBoxSearch' && !(event.target.id.toLowerCase().indexOf('img') == -1 || event.target.id.toLowerCase().indexOf('flash') == -1))
return false;
});
$('body').bind("dblclick", function () { return false; });
$("body").bind('selectstart', function (event) { return false; });
$('body').bind("contextmenu", function () { return false; });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment