window.onkeypress = protection; window.oncontextmenu = protection; function protection(e) { if (e.which==3 || e.which==99) { alert("Sorry for any inconvenience, some feature were disabled to prevent plagiarism"); return false; } }