Wednesday
Aug112004
Amazon: noRightClick(e)
Wednesday, August 11, 2004 at 12:57AM
INFO SCIENCE: Amazon adds this little bit of code to disable your right click context menu when you're using their "look inside the book" feature. Click here to see for yourself.
function noRightClick(e) {
if (document.layers || document.getElementById && !document.all) {
if (e.which == 2 || e.which == 3) {
document.captureEvents(Event.MOUSEDOWN);
return false;
}
} else if (document.all && !document.getElementById) {
if (event.button == 2)
return false;
}
}
function noContextMenu () {
return false;
}
document.onmousedown = noRightClick;
document.oncontextmenu = noContextMenu;
What annoying bastards. In Firefox, just go to Options -> Web Features -> Disable JavaScript to get your right click back for saving images and the like.
Reader Comments (1)
Someone should make a firefox extension that overrides any right click javascript.