function disable_copy(hotkey) { if(!hotkey) var hotkey = document.body; if (typeof hotkey.onselectstart!="undefined") //For IE hotkey.onselectstart=function(){return false} else if (typeof hotkey.style.MozUserSelect!="undefined") //For Firefox hotkey.style.MozUserSelect="none" else //Opera hotkey.onmousedown=function(){return false} hotkey.style.cursor = "default" } function disableEnterKey(e) { if (!e) var e = window.event; if (e.ctrlKey){ alert('content is protected!'); var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox (97) if (key == 97 || key == 65 || key == 67 || key == 88 || key == 43 || key == 26 || key == 5) return false; else return true; } } $(function(){ $(".moz").click(function(i) { var item_name = '?item_name='+ $(this).attr("title"); window.open("/moz/" + $(this).attr("title") + ".html"); }); }); function md(e) { try { if (event.button==2||event.button==3) return false; } catch (e) { if (e.which == 3) return false; } } document.oncontextmenu = function() { return false; } document.ondragstart = function() { return false; } document.onmousedown = md; disable_copy(document.body); document.body.onkeypress = disableEnterKey; //this disable Ctrl+A select action for firefox specially //chrome + mac $(document).keydown(function(event) { if(event.which == 17) return false; //chrome ctrl key if(event.which == 157) return false; //mac command key if(event.ctrlKey) return false; //random //event.preventDefault(); //return false; });