Skip to content

Instantly share code, notes, and snippets.

@ryanseddon
Created August 18, 2014 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanseddon/e08390a501cfe320a01b to your computer and use it in GitHub Desktop.
Save ryanseddon/e08390a501cfe320a01b to your computer and use it in GitHub Desktop.
Typical code written by a tab supporter
var IE = 0,
OLD = 0;
function doListen() {
if(navigator.appName.indexOf("Explorer") > 0) IE = 1;
if(IE!=1 && parseInt(navigator.appVersion) == 4) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = mtMenu;
OLD=1;
}
if(IE==0 && OLD==0) document.addEventListener("mousedown", mtMenu, false)
}
function mtMenu(e) {
if(IE==1) event.returnValue = false;
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment