From dd5cd5c686003aad3d84866c207f28767f0f38fc Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 19 Mar 2018 07:10:59 +0300 Subject: [PATCH] correctly show "Everything" in applies-to column * don't show it twice * show it if the style targets were actually removed since the last paint --- manage/manage.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manage/manage.js b/manage/manage.js index b8955b61..156b6979 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -283,8 +283,14 @@ function createStyleTargetsElement({entry, style, iconsOnly}) { } } if (numTargets) { - if (!iconsOnly) entryTargets.parentElement.replaceChild(targets, entryTargets); - } else { + if (!iconsOnly) { + entryTargets.parentElement.replaceChild(targets, entryTargets); + } + } else if (!entry.classList.contains('global') || + !entryTargets.firstElementChild) { + if (entryTargets.firstElementChild) { + entryTargets.textContent = ''; + } entryTargets.appendChild(template.appliesToEverything.cloneNode(true)); } entry.classList.toggle('global', !numTargets);