From 5bf124ccc467a3ae6f8a0f4f3e864dd48421fa1b Mon Sep 17 00:00:00 2001 From: yebyen Date: Wed, 9 Apr 2014 15:39:43 -0400 Subject: [PATCH] Link with protocol breaks https You can make this link without including the protocol, safely and so that any site served via HTTPS does not cause warnings about unsecured content on the page. Any visitors with document.location that starts with https: will go to https://gravatar... etc and any visitors with otherwise or http: browser's document.location will not notice any difference. --- lib/wheat/tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wheat/tools.js b/lib/wheat/tools.js index 5fda465..4205af1 100644 --- a/lib/wheat/tools.js +++ b/lib/wheat/tools.js @@ -28,7 +28,7 @@ var Helpers = { size = size || 200; var hash = Crypto.createHash('md5') hash.update((email+"").trim().toLowerCase()) - return "http://www.gravatar.com/avatar/" + + return "//www.gravatar.com/avatar/" + hash.digest('hex') + "?r=pg&s=" + size + ".jpg&d=identicon"; },