Skip to content

Commit

Permalink
feat: add google as provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Oct 24, 2021
1 parent 61fb2e3 commit 7507977
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
13 changes: 13 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,19 @@ <h3>GitHub</h3>
>https://unavatar.io/github/mdo</a
>
</p>
<h3>Google</h3>
<p>
<code>&lt;img src="https://unavatar.io/google/:domain" /&gt;</code>
</p>
<p>
e.g.,
<a
target="_blank"
rel="noopener noreferrer"
href="https://unavatar.io/google/netflix.com"
>https://unavatar.io/google/netflix.com</a
>
</p>
<h3>Gravatar</h3>
<p>
<code>&lt;img src="https://unavatar.io/gravatar/:email" /&gt;</code>
Expand Down
9 changes: 9 additions & 0 deletions src/providers/google.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'

module.exports = async url => `https://www.google.com/s2/favicons?domain_url=${url}`

module.exports.supported = {
email: false,
username: false,
domain: true
}
3 changes: 2 additions & 1 deletion src/providers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
const { reduce } = require('lodash')

const providers = {
microlink: require('./microlink'),
deviantart: require('./deviantart'),
dribbble: require('./dribbble'),
duckduckgo: require('./duckduckgo'),
github: require('./github'),
gitlab: require('./gitlab'),
google: require('./google'),
gravatar: require('./gravatar'),
instagram: require('./instagram'),
microlink: require('./microlink'),
reddit: require('./reddit'),
soundcloud: require('./soundcloud'),
substack: require('./substack'),
Expand Down

1 comment on commit 7507977

@vercel
Copy link

@vercel vercel bot commented on 7507977 Oct 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.