如何设置 Chrome 以让 Outlook.com 处理 mailto: 链接?

Pro*_*one 5 google-chrome mailto outlook.com

当您访问 gmail.com 时,Chrome 会要求您让mailto:链接由 gmail 处理。在 Outlook.com 上,Microsoft 忘记向其用户提供此功能。自己怎么做?

编辑 2021-8-3 此功能现已内置到 Outlook.com 网站中!只需加载站点和收件箱,您就会在顶部附近看到一个带有按钮的栏,以启用该功能(如果 Outlook 认为您的浏览器兼容)。

Pin*_*ino 5

我的公司有 Office 365,在线 Outlook 托管在https://outlook.office.com/。要在 Chrome 中将此站点设置为电子邮件处理程序:

  1. 打开 Web 邮件站点
  2. 打开 Chrome 控制台 ( ctrl+ shift+ j)
  3. 在控制台中复制以下行并点击Enter
navigator.registerProtocolHandler("mailto", "https://outlook.office.com/?path=/mail/action/compose&to=%s", "Office 365");
Run Code Online (Sandbox Code Playgroud)

如果您改变主意chrome://settings/handlers,请使用三点菜单打开并删除列出的处理程序。


Pro*_*one 4

这是一个有点复杂的过程,但您可以使用navigator.registerProtocolHandler稍微重写 URL 查询字符串的网站来完成此操作。

访问http://terrific-charger.glitch.me。这是我编写的一个小 Glitch 项目,代码如下,但您可以验证这里没有任何骗局:https://glitch.com/edit/#!/ terrific-charger?path=script.js:1 :0

打开 Chrome 控制台 ( ctrl++ shift) j,然后将以下代码粘贴到其中并按 Enter 键:

navigator.registerProtocolHandler('mailto','http://terrific-charger.glitch.me/?mailto=%s','Outlook.com');
Run Code Online (Sandbox Code Playgroud)

Chrome 现在会告诉您“ http://terrific-charger.glitch.me/想要打开电子邮件链接”。单击“允许”。就是这样!

要撤消新行为,请转至:chrome://settings/handlers,然后使用三点菜单删除列出的处理程序。

故障代码:

if (location.search.length)
   location = 'https://outlook.live.com/default.aspx?rru=compose&to=' + 
       decodeURIComponent(location.search).slice('?mailto=mailto:'.length).replace('?','&');
Run Code Online (Sandbox Code Playgroud)