init function
Last updated: 2026-03-05T23:41:17.506Z
Location
Metrics
LOC: 19
Complexity: 3
Params: 0
Signature
init(): : Promise<void>
Source Code
async function init(): Promise<void> {
const settings = (await chrome.runtime.sendMessage({
type: "GET_SETTINGS",
})) as { uiLanguage?: "auto" | "en" | "pt_BR" } | null;
await initI18n(settings?.uiLanguage ?? "auto");
// Sync watcher state from content script
const watcherStatus = (await sendToPage({ type: "GET_WATCHER_STATUS" }).catch(
() => null,
)) as { watching: boolean } | null;
panelState.watcherActive = watcherStatus?.watching ?? false;
// Inject log viewer styles
const lvStyle = document.createElement("style");
lvStyle.textContent = getLogViewerStyles("devtools");
document.head.appendChild(lvStyle);
renderApp();
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| sendToPage | calls |
| renderApp | calls |
No incoming dependencies.