Replace this and the next few lines with:

    localStorage.setItem('serverEnabled', serverEnabled.checked);

(note that `localStorage` only works with strings, and we rely on the automatic conversion from `true` to "true"` and `false` to `"false"`)