如何从 CLI 在 Microsoft Edge 中将网站作为应用程序打开?

问题描述

在 Chrome 中你可以使用

start chrome --new-window --app=http://www.example.com 

在缩小的窗口中打开它(PWA 样式)。 Chrome as app

MicrosoftEdge 如何做到这一点?

解决方法

我假设您使用的是 MS Edge (Chromium) 浏览器。

您只需要将上面发布的命令中的 ... function getAccess() { const responseType = 'token'; const CLIENTID = process.end.CLIENT_ID; let redirect = `https://accounts.spotify.com/authorize?response_type=${responseType}&client_id=${CLIENTID}&scope=${scopes}&redirect_uri=${redirectUri}`; window.location = redirect; } ... 替换为 Chrome

修改后的命令:

msedge

使用 Microsoft Edge 输出:

enter image description here