diff --git a/js/components/urlBar.js b/js/components/urlBar.js index 8f70c6a9ad6..8ed1608581f 100644 --- a/js/components/urlBar.js +++ b/js/components/urlBar.js @@ -173,17 +173,16 @@ class UrlBar extends ImmutableComponent { this.updateDOM() } - get titleValue () { - const parsedUrl = urlParse(this.props.activeFrameProps.get('location')) - let titlePrefix = '' - if (parsedUrl.protocol !== 'about:') { - titlePrefix += parsedUrl.host + ' | ' - } + get hostValue () { + const parsed = urlParse(this.props.activeFrameProps.get('location')) + return parsed.host && parsed.protocol !== 'about:' ? parsed.host : '' + } + get titleValue () { // For about:newtab we don't want the top of the browser saying New Tab // Instead just show "Brave" return ['about:blank', 'about:newtab'].includes(this.props.urlbar.get('location')) - ? '' : titlePrefix + this.props.activeFrameProps.get('title') + ? '' : this.props.activeFrameProps.get('title') } get locationValue () { @@ -191,11 +190,6 @@ class UrlBar extends ImmutableComponent { ? '' : this.props.urlbar.get('location') } - get inputValue () { - return this.props.titleMode - ? this.titleValue : this.locationValue - } - get loadTime () { let loadTime = '' if (this.props.activeFrameProps.get('startLoadTime') && @@ -248,7 +242,9 @@ class UrlBar extends ImmutableComponent { extendedValidation: this.extendedValidationSSL })}/>