[Mac][Chrome] メールリンクをクリックしたら Gmail で開くようにする

Chrome でメールのリンクをクリックするとデフォルトのメーラーアプリが起動してしまう。これを Chrome の Gmail で開くようにしたい。

その方法をググって調べると、アドレスバーの星マーク左にあるアイコンをクリックするようにと書かれているが、なぜか私の Chrome ではそのアイコンが表示されていない。そこで別の方法を見つけた。

(1)Chrome で以下にアクセスする。

chrome://settings/handlers

(2-A)email に mail.googl.com が登録されている場合、その行の右に、縦に点が3つ並んだアイコンがあるのでクリック。Set as default をクリック。

(2-B)email に mail.googl.com が登録されていない場合、Gmail のタブ上で Cmd + Opt + j を押す。Console に以下をペーストし、Enter。Gmail を許可するかというダイアログが出るので OK をクリック。

navigator.registerProtocolHandler("mailto",
                                  "https://mail.google.com/mail/?extsrc=mailto&url=%s",
                                  "Gmail");

これでメールリンクをクリックしたら Gmail で開くようになった。

参考:
メールのリンクをクリックした時に Gmail を起動する方法 | kazumich.log
https://kazumich.com/mailto-handler-gmail.html

Getting Gmail to handle all mailto: links with registerProtocolHandler  |  Web  |  Google Developers
https://developers.google.com/web/updates/2012/02/Getting-Gmail-to-handle-all-mailto-links-with-registerProtocolHandler