window.onkeypress = protection; window.oncontextmenu = protection; document.body.onmousedown = "return false"; document.body.onselectstart = "return false"; document.body.style.MozUserSelect = "none"; function protection(e) { if (e.which==3) { alert("Sorry for any inconvenience, some feature were disabled to prevent plagiarism"); return false; } }