Appearance
Function: initTheme()
ts
function initTheme(ctx: Context): Promise<void>;Defined in: src/themes/themesConfig.ts:59
Load assistant colors from the context and write them to localStorage. Fall back to the classic theme when no custom colors exist.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The assistant context with page access. |
Returns
Promise<void>
A promise that resolves when the theme is stored.
Example
ts
await initTheme(ctx);
// localStorage now holds the MW_THEME key