maybe jquery is at fault? i'm not sure... but this browser detection isn't doing anything anyway, and has other dodgy code paths (eg line 46... what if it's webkit but not chrome or safari)
Remove browser detection which broke on IE11
IE11 was crashing at line 39 because matches == null.
Yeah, IE11 made it really really difficult to detect what version of the browser you are on.