MCPcopy
hub / github.com/philc/vimium / saveOptions

Function saveOptions

pages/options.js:266–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264}
265
266export async function saveOptions() {
267 const hasErrors = showValidationErrors();
268 if (hasErrors) {
269 // TODO(philc): If no fields with validation errors are in view, scroll one of them into view
270 // so it's clear what the issue is.
271 return;
272 }
273
274 await Settings.setSettings(getSettingsFromForm());
275 const el = document.querySelector("#save");
276 el.disabled = true;
277 el.textContent = "Saved";
278}
279
280function showElement(el, visible) {
281 el.style.display = visible ? null : "none";

Callers 1

initFunction · 0.85

Calls 2

getSettingsFromFormFunction · 0.85
showValidationErrorsFunction · 0.70

Tested by

no test coverage detected