Skip to content

Commit

Permalink
add basic error popup
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwrd committed Jan 30, 2019
1 parent 356cae0 commit 5d1d1a5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions open-with-pennywise/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
});
}

Expand Down
14 changes: 14 additions & 0 deletions open-with-pennywise/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>

<html>

<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css" />
</head>

<body>
<div class="centered">Cannot connect to Pennywise</div>
</body>

</html>
9 changes: 9 additions & 0 deletions open-with-pennywise/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body {
min-width: 190px;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
}

.centered {
text-align: center;
}

0 comments on commit 5d1d1a5

Please sign in to comment.