Replace browser detection code.