10 lines
362 B
JavaScript
10 lines
362 B
JavaScript
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;
|
|
}
|
|
}); |