diff --git a/popup.css b/popup.css index 188a2f77..f1e23951 100644 --- a/popup.css +++ b/popup.css @@ -1,7 +1,6 @@ body { width: 252px; font-size: 12px; - height: 50px; /**/ font-family: Arial,"Helvetica Neue",Helvetica,sans-serif; } input[type=checkbox] { @@ -228,6 +227,7 @@ body>div:not(#installed) { justify-content: center; } #confirm { + z-index: 2147483647; display: none; /* flex */ position: absolute; left: 0; diff --git a/popup.js b/popup.js index af93d162..f96483e1 100644 --- a/popup.js +++ b/popup.js @@ -82,6 +82,9 @@ function showStyles(styles) { styles.map(createStyleElement).forEach(function(e) { installed.appendChild(e); }); + // force Chrome to resize the popup + document.body.style.height = '10px'; + document.documentElement.style.height = '10px'; } function createStyleElement(style) { @@ -131,9 +134,6 @@ document.getElementById('confirm').addEventListener('click', e => { if (document.getElementById('installed').children.length === 0) { showStyles([]); } - // force Chrome to minimize popup's height - document.body.style.height = '10px'; - document.documentElement.style.height = '10px'; }); } //