improve cross-browser functions

This PR removes an 'if' statement from each cross browser functions. This is a micro optimisation but it can't hurt.