diff --git a/scripts/content.js b/scripts/content.js index 622aff0..941a4df 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -501,8 +501,12 @@ async function runner() { } if (apptDate != ctx.currentAppt.date || apptConsulate != ctx.currentAppt.consulate) { - console.log(`New appointment date: ${apptDate} at ${apptConsulate}, - old: ${ctx.currentAppt.consulate} at ${ctx.currentAppt.date}`); + msg = `New appointment date: ${apptDate} at ${apptConsulate}` + if (ctx.currentAppt.date != null) { + sendNotification(msg); + } + msg += `, was: ${ctx.currentAppt.consulate} at ${ctx.currentAppt.date}` + console.log(msg); ctx.currentAppt = { consulate: apptConsulate, date: apptDate }; await chrome.storage.local.set({ "ctx_currentAppt": ctx.currentAppt }); }