diff --git a/background/index.js b/background/index.js
index 24744cd..b510c61 100644
--- a/background/index.js
+++ b/background/index.js
@@ -31,11 +31,11 @@ async function updateBadge(open) {
}
function sendNotification(open) {
- browser.notifications.create('notification-id', {
+ browser.notifications.create('status-change', {
type: 'basic',
- iconUrl: browser.runtime.getURL('icons/logo.svg'),
title: 'Space Status',
- message: `Space ist jetzt ${open ? 'offen' : 'geschlossen'}.`
+ message: `Space ist jetzt ${open ? 'offen' : 'geschlossen'}.`,
+ iconUrl: browser.runtime.getURL('icons/logo.svg')
});
}
diff --git a/popup/index.js b/popup/index.js
index b237e8b..207e561 100644
--- a/popup/index.js
+++ b/popup/index.js
@@ -15,7 +15,6 @@ async function init() {
try {
const page = await browser.runtime.getBackgroundPage();
- console.log(page);
updateNextEvent(page.calendar);
updateSpaceApiJson(page.spaceApi);
@@ -49,7 +48,7 @@ function updateNextEvent(nextEvents) {
const timeElement = document.createElement('time');
strongElement.textContent = nextEventDateEvent.name;
timeElement.datetime = beginDate.toISOString();
- const dateNode = document.createTextNode(beginDate.toLocaleString([], {dateStyle: "short", timeStyle: "short"}));
+ const dateNode = document.createTextNode(beginDate.toLocaleString([], {dateStyle: "medium", timeStyle: "short"}));
// divElement.innerText = '';
divElement.append(strongElement);
divElement.append(document.createTextNode(' '));
@@ -75,7 +74,7 @@ function updateSpaceApiJson(spaceApi) {
function updateState(spaceApi) {
const stateElement = document.getElementById('state');
const since = new Date(spaceApi.state.lastchange * 1000);
- const sinceStr = ` seit `;
+ const sinceStr = ` seit `;
if (spaceApi.state.open) {
stateElement.innerHTML = `Offen ${sinceStr}`;
} else {