Fix word breaks in popup. See #312

This commit is contained in:
Rob Garrison 2019-11-14 19:29:40 -06:00
parent 2742cbe120
commit 7083b2b6b7

View File

@ -141,7 +141,7 @@ function initPopup() {
$('label', info).textContent = t('unreachableAMO');
const note = (FIREFOX < 59 ? t('unreachableAMOHintOldFF') : t('unreachableAMOHint')) +
(FIREFOX < 60 ? '' : '\n' + t('unreachableAMOHintNewFF'));
const renderToken = s => s[0] === '<' ? $create('b', tWordBreak(s.slice(1, -1))) : s;
const renderToken = s => s[0] === '<' ? $create('b', s.slice(1, -1)) : s;
const renderLine = line => $create('p', line.split(/(<.*?>)/).map(renderToken));
const noteNode = $create('fragment', note.split('\n').map(renderLine));
info.appendChild(noteNode);