Example code + update due to changes in Webkit

To catch middle mouse click in Webkit, ‘mouseup’ is now required. Also,
the event.which for middle mouse thus changed from 1 to 2.

Since the code required became a bit more complex I added example usage.