diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index 79864f284..e61847427 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -698,7 +698,16 @@ window.gZenUIManager = { this.urlbarShowDomainOnly ) { let url = BrowserUIUtils.removeSingleTrailingSlashFromURL(aURL); - return url.startsWith("https://") ? url.split("/")[2] : url; + requestIdleCallback(() => { + // Scroll the urlbar all the way to the right so that + // the domain is always visible when the url is too long. + gURLBar.inputField.scrollLeft = gURLBar.inputField.scrollWidth; + }); + let stripped = url.startsWith("https://") ? url.split("/")[2] : url; + if (stripped.startsWith("www.")) { + stripped = stripped.substring(4); + } + return stripped; } return BrowserUIUtils.trimURL(aURL); },