using window.chrome instead of typeof(chrome)