Skip to content
Create a gist now

Instantly share code, notes, and snippets.

How to be an asshole
//no context menu
document.oncontextmenu = function(){return false}
//no loading in iframes
if (parent.frames.length > 0) top.location.replace(document.location);
//no dragging
document.ondragstart = function(){return false}
//no text selection, in IE
if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
return false
} else {
return true;
//no text selection, in Firefox
if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD") {
return true;
} else {
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.