diff --git a/logo/github.svg b/logo/github.svg index c81a5ba..99e8eb5 100644 --- a/logo/github.svg +++ b/logo/github.svg @@ -1,3 +1,3 @@ - + diff --git a/logo/gratipay.svg b/logo/gratipay.svg new file mode 100644 index 0000000..fcf505e --- /dev/null +++ b/logo/gratipay.svg @@ -0,0 +1,3 @@ + + + diff --git a/server.js b/server.js index 0335cb4..3a25522 100644 --- a/server.js +++ b/server.js @@ -650,6 +650,9 @@ cache(function(data, match, sendBadge, request) { var format = match[3]; var apiUrl = 'https://www.gratipay.com/' + user + '/public.json'; var badgeData = getBadgeData('tips', data); + if (badgeData.template === 'social') { + badgeData.logo = badgeData.logo || logos.gratipay; + } request(apiUrl, function dealWithData(err, res, buffer) { if (err != null) { badgeData.text[1] = 'inaccessible';