saveWatcherSettings function
Last updated: 2026-03-03T18:32:34.140Z
Metrics
LOC: 31
Complexity: 2
Params: 0
Signature
saveWatcherSettings(): : Promise<void>
Source Code
async function saveWatcherSettings(): Promise<void> {
const settings: Partial<Settings> = {
watcherEnabled: (
document.getElementById("setting-watcher-enabled") as HTMLInputElement
).checked,
watcherAutoRefill: (
document.getElementById("setting-watcher-auto-refill") as HTMLInputElement
).checked,
watcherShadowDOM: (
document.getElementById("setting-watcher-shadow-dom") as HTMLInputElement
).checked,
watcherDebounceMs: Math.min(
5000,
Math.max(
100,
Number(
(
document.getElementById(
"setting-watcher-debounce",
) as HTMLInputElement
).value,
) || 600,
),
),
};
await chrome.runtime.sendMessage({
type: "SAVE_SETTINGS",
payload: settings,
});
showToast(t("savedAuto"));
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| bindSettingsEvents | calls |