From 3ffbce0bc71e9fa67d8552a1e9f52d44a03c02b9 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 12 Dec 2017 17:09:42 +0300 Subject: [PATCH] adapt to #installed having a persistent child now --- popup/popup.js | 8 +------- popup/search-results.css | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/popup/popup.js b/popup/popup.js index 50be91bd..e96af1f3 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -194,7 +194,6 @@ function showStyles(styles) { return; } if (!styles.length) { - installed.textContent = ''; installed.appendChild(template.noStyles.cloneNode(true)); window.dispatchEvent(new Event('showStyles:done')); return; @@ -345,12 +344,7 @@ Object.assign(handleEvent, { }); if (ok) { deleteStyleSafe({id}).then(() => { - // don't wait for the async notifyAllTabs as we check the children right away handleDelete(id); - // update view with 'No styles installed for this site' message - if (!installed.children.length) { - showStyles([]); - } }); } } @@ -468,7 +462,7 @@ function handleUpdate(style) { function handleDelete(id) { $.remove(ENTRY_ID_PREFIX + id); - if (!installed.firstElementChild) { + if (!$('.entry')) { installed.appendChild(template.noStyles.cloneNode(true)); } } diff --git a/popup/search-results.css b/popup/search-results.css index bacbb417..fb0e619a 100755 --- a/popup/search-results.css +++ b/popup/search-results.css @@ -226,9 +226,9 @@ body.search-results-shown { #search-results .search-results-nav button { background: none; border: none; - padding: .25rem 1rem; + padding: 0 1rem; margin: 0 .5rem; - font-size: 200%; + font-size: 150%; line-height: 24px; vertical-align: middle; cursor: pointer;