saveAiSettings function
Last updated: 2026-03-03T18:32:34.140Z
Metrics
LOC: 25
Complexity: 2
Params: 0
Signature
saveAiSettings(): : Promise<void>
Source Code
async function saveAiSettings(): Promise<void> {
const settings: Partial<Settings> = {
showFillToast: (
document.getElementById("setting-show-fill-toast") as HTMLInputElement
).checked,
showAiBadge: (
document.getElementById("setting-show-ai-badge") as HTMLInputElement
).checked,
aiTimeoutMs: Math.min(
15000,
Math.max(
2000,
Number(
(document.getElementById("setting-ai-timeout") as HTMLInputElement)
.value,
) || 5000,
),
),
};
await chrome.runtime.sendMessage({
type: "SAVE_SETTINGS",
payload: settings,
});
showToast(t("savedAuto"));
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| bindSettingsEvents | calls |