turns out my isFirefox check was unnecessary due to truthiness.