From 5d1d1a561b7922c704d4fafddf8037d980f446e8 Mon Sep 17 00:00:00 2001 From: Alex Ward Date: Wed, 30 Jan 2019 14:52:02 +0000 Subject: [PATCH] add basic error popup --- open-with-pennywise/background.js | 2 ++ open-with-pennywise/error.html | 14 ++++++++++++++ open-with-pennywise/style.css | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 open-with-pennywise/error.html create mode 100644 open-with-pennywise/style.css diff --git a/open-with-pennywise/background.js b/open-with-pennywise/background.js index ec68034..e0fa38e 100644 --- a/open-with-pennywise/background.js +++ b/open-with-pennywise/background.js @@ -32,10 +32,12 @@ function ping() { }); }); browser.browserAction.setIcon({ path: icons }) + browser.browserAction.setPopup({ popup: "" }) }) .catch(error => { browser.menus.remove(menuItemId); browser.browserAction.setIcon({ path: iconsInactive }) + browser.browserAction.setPopup({ popup: "error.html" }) }); } diff --git a/open-with-pennywise/error.html b/open-with-pennywise/error.html new file mode 100644 index 0000000..85e175f --- /dev/null +++ b/open-with-pennywise/error.html @@ -0,0 +1,14 @@ + + + + + + + + + + +
Cannot connect to Pennywise
+ + + \ No newline at end of file diff --git a/open-with-pennywise/style.css b/open-with-pennywise/style.css new file mode 100644 index 0000000..7291320 --- /dev/null +++ b/open-with-pennywise/style.css @@ -0,0 +1,9 @@ +body { + min-width: 190px; + font-family: Verdana, Geneva, sans-serif; + font-size: 12px; +} + +.centered { + text-align: center; +}