aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r--ext/bg/js/settings/main.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index c5298dd4..315766e0 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -16,6 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+function getOptionsMutable(optionsContext) {
+ return utilBackend().getOptions(optionsContext);
+}
+
+function getOptionsFullMutable() {
+ return utilBackend().getFullOptions();
+}
+
async function formRead(options) {
options.general.enable = $('#enable').prop('checked');
options.general.showGuide = $('#show-usage-guide').prop('checked');
@@ -164,7 +172,7 @@ function formUpdateVisibility(options) {
async function onFormOptionsChanged() {
const optionsContext = getOptionsContext();
- const options = await apiOptionsGet(optionsContext);
+ const options = await getOptionsMutable(optionsContext);
await formRead(options);
await settingsSaveOptions();
@@ -190,7 +198,7 @@ async function onOptionsUpdate({source}) {
if (source === thisSource) { return; }
const optionsContext = getOptionsContext();
- const options = await apiOptionsGet(optionsContext);
+ const options = await getOptionsMutable(optionsContext);
await formWrite(options);
}