Subscribe endpoint consolidation; same behavior for all endpoints; keepalive
This commit is contained in:
parent
b72afb1695
commit
a38aca47bd
8 changed files with 154 additions and 93 deletions
|
@ -40,6 +40,10 @@ p {
|
|||
line-height: 140%;
|
||||
}
|
||||
|
||||
p.smallMarginBottom {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
tt {
|
||||
background: #eee;
|
||||
padding: 2px 7px;
|
||||
|
@ -53,7 +57,7 @@ code {
|
|||
padding: 20px;
|
||||
border-radius: 3px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Lato font (OFL), https://fonts.google.com/specimen/Lato#about,
|
||||
|
|
|
@ -60,7 +60,7 @@ const subscribeInternal = (topic, delaySec) => {
|
|||
eventSource.onmessage = (e) => {
|
||||
const event = JSON.parse(e.data);
|
||||
notifySound.play();
|
||||
new Notification(topic, {
|
||||
new Notification(`${location.host}/${topic}`, {
|
||||
body: event.message,
|
||||
icon: '/static/img/favicon.png'
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue