讓 Gmail 處理所有 mailto - 使用 registerProtocolHandler 連結
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如果您使用 Gmail,可能會不小心按到 mailto:
連結而感到困擾,現在您的 Outlook 或「郵件」桌面用戶端也啟動了。
有了 navigator.registerProtocolHandler()
(先前所述的情況),您可以將 Gmail 設為所有在 Chrome 和 Firefox 中的 mailto:
連結的預設郵件用戶端。
做法如下:
- 首先,請開啟 Gmail 分頁。請注意,您必須透過 Gmail 分頁 (而不是 html5rocks)。:)
- 開啟 JavaScript 控制台 (Mac 為
cmd-opt-j
,Windows 為 ctrl-shift-j
),然後輸入:
navigator.registerProtocolHandler("mailto", "https://mail.google.com/mail/?extsrc=mailto&url=%s", "Gmail");
- 接受瀏覽器的確認訊息。
- 點選 this mailto: link 即可測試新版 Gmail mailto 連線方式!
好棒,好好享受。
如果您需要移除此設定,請使用 Chrome 的 chrome://settings/handlers
或 Firefox 的 Preferences->Applications->mailto
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2012-02-07 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]