From f7f40b9cbe78a19fd5fa8f9ec06b56220d85d179 Mon Sep 17 00:00:00 2001 From: 10001shh Date: Thu, 10 Jan 2019 22:39:47 -0600 Subject: [PATCH] styling --- css/popup.css | 4 ++-- js/background.js | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/css/popup.css b/css/popup.css index 1c02006e..a0111291 100644 --- a/css/popup.css +++ b/css/popup.css @@ -50,7 +50,7 @@ body { } ul { - margin-bottom: 20px; + margin-bottom: 30px; } i { @@ -67,7 +67,7 @@ i { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); transition: 0.3s; padding: 7px 5px 5px 7px; - margin-right: 10px; + margin-right: 0px; border-radius: 7px; } diff --git a/js/background.js b/js/background.js index 681a3d24..4c5cf855 100644 --- a/js/background.js +++ b/js/background.js @@ -187,9 +187,15 @@ function remove(request, sender, sendResponse) { chrome.browserAction.setBadgeBackgroundColor({ color: '#bf5700' }); - chrome.browserAction.setBadgeText({ - text: "" + courses.length - }); + if (courses.length > 0) { + chrome.browserAction.setBadgeText({ + text: "" + courses.length + }); + } else { + chrome.browserAction.setBadgeText({ + text: "" + }); + } sendResponse({ done: "Removed: (" + request.course.unique + ") " + request.course.coursename, label: "Add Course +"