I think there's only one event per click ( not a right_click and left_click and middle_click ), with data in the event that tells you which button was clicked.
So, you could write a javascript that handles onclick, test which button was hit, and if it was the middle button, just do nothing ( return ). You can attach that to the body element on your page, and it should flow down to all the child elements.
Or if you want to “lock” an event, you can catch that event and do nothing. This will not pass the event to the default handler of that event if there is any.