Added js browser detection