adding middle-click event for closing open tabs