/** * Background entry point (Firefox MV3 event page, ES module). * * All event listeners are registered synchronously at the top level so the * event page can be woken by any of them (MDN: background scripts). */ import { registerRuntimeMessageHandler, handleConnection } from './message-router.js'; import { loadSettings, watchSettings } from './settings-service.js'; // One-shot messages from popup / options. registerRuntimeMessageHandler(); // Streaming connections from the content script. browser.runtime.onConnect.addListener(handleConnection); // Keep the validated settings cache in sync and load initial settings. watchSettings(); void loadSettings();