forked from april/certainly-something
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper error messages when attempting to load an old tab. Fixes april#16
- Loading branch information
Showing
7 changed files
with
89 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import './notification'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#certainly-something-notification { | ||
/* slide in and out animation */ | ||
animation: slideDown 4s .5s 1 ease forwards; | ||
transform: translateY(-50px); | ||
|
||
background: #97d4fc; | ||
box-shadow: 0 0 5px black; | ||
font-size: 16px; | ||
left: 0; | ||
line-height: 2.5; | ||
position: absolute; | ||
right: 0; | ||
text-align: center; | ||
top: 0; | ||
z-index: 5678; | ||
} | ||
|
||
@keyframes slideDown { | ||
0%, 100% { | ||
transform: translateY(-50px); | ||
} | ||
|
||
10%, 90% { | ||
transform: translateY(0px); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const showNotification = async () => { | ||
const notification = document.createElement('div'); | ||
notification.id = 'certainly-something-notification'; | ||
notification.textContent = 'Please refresh the page and try again.'; | ||
|
||
document.body.appendChild(notification); | ||
}; | ||
|
||
// show the notification if the backend code doesn't have the TLS information | ||
browser.runtime.onMessage.addListener(async request => { | ||
if (request.action === 'notify') { | ||
await showNotification(); | ||
} | ||
|
||
return(true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="css/chrome-extension.css"> | ||
<link rel="stylesheet" href="css/index.css"> | ||
<title></title> | ||
</head> | ||
<body class="browser-style"> | ||
Error loading certificate information. Please close this page, refresh your tab, and try again. Sorry! | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters