1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

set globe icon properly

This commit is contained in:
Kyle Spearrin
2017-10-16 23:19:01 -04:00
parent 6722793087
commit 65842a3dba

View File

@@ -51,13 +51,14 @@ angular
hostnameUri.indexOf('https://') !== 0) {
hostnameUri = "http://" + hostnameUri;
isWebsite = true;
ctrl.icon = 'fa-globe';
}
else {
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
ctrl.icon = 'fa-globe';
}
if (isWebsite) {
ctrl.icon = 'fa-globe';
try {
var url = new URL(hostnameUri);
ctrl.image = 'https://icons.bitwarden.com/' + url.hostname + '/icon.png';