LoginSignup
8
6

More than 5 years have passed since last update.

mailtoをクリックしたらGmailを開くようにする

Last updated at Posted at 2012-02-10

参考: Getting Gmail to handle all mailto: links with registerProtocolHandler

mailtoタグをクリックしたとき Outlook や Mail でなく Gmail を起動する方法。
firefox と chrome で動かせるらしい。

1 Gmail をタブで開く
2 Gmail のタブで JavaScript コンソールを開く(cmd-opt-j on Mac, ctrl-shift-j on Windows)
3 以下のコードをコンソールで実行

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

4 通知がでるので許可する
5 完了

参考ページ(というか元ネタページ)の 5 のところにサンプルの mailto リンクがあるから試しにクリックしてみると、Gmail が起動されるのが確認できるはず

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6