From e0c9c13856dae5c8b667d2d3e74fbbf4416f7c63 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 21 Feb 2022 02:36:03 +0300 Subject: [PATCH] explicitly hyphenate domains in popup --- popup/popup.css | 4 ---- popup/popup.js | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/popup/popup.css b/popup/popup.css index 8b690a32..c780fee0 100644 --- a/popup/popup.css +++ b/popup/popup.css @@ -465,10 +465,6 @@ a:hover .svg-icon { margin-left: .6ex } -.write-style-link::before { - content: "\00ad"; /* "soft" hyphen */ -} - .about-blank > .breadcrumbs { pointer-events: none; } diff --git a/popup/popup.js b/popup/popup.js index b096bce9..e22049ee 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -202,7 +202,7 @@ function createWriterElement(frame) { title: `url-prefix("${url}")`, tabIndex: isAboutBlank ? -1 : 0, textContent: prefs.get('popup.breadcrumbs.usePath') - ? new URL(url).pathname.slice(1) + ? t.breakWord(new URL(url).pathname.slice(1)) : frameId ? isAboutBlank ? url : 'URL' : t('writeStyleForURL').replace(/ /g, '\u00a0'), // this URL @@ -227,7 +227,7 @@ function createWriterElement(frame) { const domainLink = t.template.writeStyle.cloneNode(true); Object.assign(domainLink, { href: 'edit.html?domain=' + encodeURIComponent(domain), - textContent: numParts > 2 ? domain.split('.')[0] : domain, + textContent: t.breakWord(numParts > 2 ? domain.split('.')[0] : domain), title: `domain("${domain}")`, onclick: e => Events.openEditor(e, {domain}), });