From 708ff9772397998e1b931028b65fae89ceb03a63 Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Mon, 13 Mar 2017 22:56:43 +0330 Subject: [PATCH] new fix for https://github.com/schomery/stylish-chrome/issues/43#issuecomment-286154032 --- popup.css | 1 + popup.html | 23 ++++++++++++----------- popup.js | 8 +++++++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/popup.css b/popup.css index 0d594e72..188a2f77 100644 --- a/popup.css +++ b/popup.css @@ -1,6 +1,7 @@ body { width: 252px; font-size: 12px; + height: 50px; /**/ font-family: Arial,"Helvetica Neue",Helvetica,sans-serif; } input[type=checkbox] { diff --git a/popup.html b/popup.html index 432f4bf6..465efa02 100644 --- a/popup.html +++ b/popup.html @@ -37,6 +37,18 @@ + +
+
+ Style's Name + +
+ + +
+
+
+
@@ -67,17 +79,6 @@
- -
-
- Style's Name - -
- - -
-
-
diff --git a/popup.js b/popup.js index 09037d2f..af93d162 100644 --- a/popup.js +++ b/popup.js @@ -127,7 +127,13 @@ document.getElementById('confirm').addEventListener('click', e => { let cmd = e.target.dataset.cmd; if (cmd === 'ok') { deleteStyle(document.getElementById('confirm').dataset.id, () => { - //window.close(); + // update view with 'No styles installed for this site' message + 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'; }); } //