summaryrefslogtreecommitdiff
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.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js
index 0cb1734e..64611ad5 100644
--- a/ext/bg/js/settings/main.js
+++ b/ext/bg/js/settings/main.js
@@ -16,6 +16,7 @@
*/
/* global
+ * ProfileController
* SettingsBackup
* SettingsController
* ankiInitialize
@@ -25,15 +26,28 @@
* appearanceInitialize
* audioSettingsInitialize
* dictSettingsInitialize
- * getOptionsContext
* onAnkiOptionsChanged
* onDictionaryOptionsChanged
- * profileOptionsSetup
* storageInfoInitialize
* utilBackend
* utilBackgroundIsolate
*/
+let profileIndex = 0;
+
+function getOptionsContext() {
+ return {index: getProfileIndex()};
+}
+
+function getProfileIndex() {
+ return profileIndex;
+}
+
+function setProfileIndex(value) {
+ profileIndex = value;
+}
+
+
function getOptionsMutable(optionsContext) {
return utilBackend().getOptions(
utilBackgroundIsolate(optionsContext)
@@ -302,7 +316,7 @@ async function onReady() {
formSetupEventListeners();
appearanceInitialize();
await audioSettingsInitialize();
- await profileOptionsSetup();
+ await (new ProfileController()).prepare();
await dictSettingsInitialize();
ankiInitialize();
ankiTemplatesInitialize();