Skip to content

Commit

Permalink
getting the data from thunderai and writing it to the console at the …
Browse files Browse the repository at this point in the history
…moment. see #micz/ThunderAI#182
  • Loading branch information
micz committed Jan 12, 2025
1 parent 42c473c commit 9f5d8e6
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions mztas-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,20 @@
// }
// =========================================

// Listen for messages
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
console.log("Message received:", message);
console.log("Sender info:", sender);

switch (message.action) {
case "openCalendarDialog":
browser.CalendarTools.openCalendarDialog(message.data);
break;
}

return true;
});

// Listen for messages from ThunderAI
browser.runtime.onMessageExternal.addListener((message, sender, sendResponse) => {
console.log("Message received:", message);
console.log("Sender info:", sender);
console.log(">>>>>>>>>>> Message received:", message);
console.log(">>>>>>>>>>> Sender info:", sender);

switch (message.action) {
case "checkPresence":
return Promise.resolve("ok");
break;

case "openCalendarEventDialog":
console.log(">>>>>>>>>>> openCalendarEventDialog: ", message.data);
//browser.CalendarTools.openCalendarDialog(message.data);
break;
}

return true;
Expand Down

0 comments on commit 9f5d8e6

Please sign in to comment.