1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 22:53:44 +00:00

view login info/styles

This commit is contained in:
Kyle Spearrin
2018-01-24 23:26:40 -05:00
parent 78dcb875cf
commit fcdbed93a3
6 changed files with 299 additions and 20 deletions

View File

@@ -71,7 +71,23 @@ export class DesktopPlatformUtilsService implements PlatformUtilsService {
}
getDomain(uriString: string): string {
return uriString;
if (uriString == null) {
return null;
}
uriString = uriString.trim();
if (uriString === '') {
return null;
}
if (uriString.indexOf('://') > -1) {
try {
const url = new URL(uriString);
return url.hostname;
} catch (e) { }
}
return null;
}
isViewOpen(): boolean {