eight-hourr/extension/background.js

10 lines
362 B
JavaScript
Raw Permalink Normal View History

2026-07-17 06:55:36 +00:00
const DEFAULT_BACKEND = "http://localhost:8765";
chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
if (message?.type === "SYNC_TO_BACKEND") {
syncSession(message.auth, message.backendUrl)
.then((result) => sendResponse(result))
.catch((err) => sendResponse({ ok: false, error: err.message }));
return true;
}
});