summaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 863e8916..a4e39e41 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -39,6 +39,7 @@ function optionsSetDefaults(options) {
anki: {
enable: false,
+ server: 'http://127.0.0.1:8765',
tags: ['yomichan'],
htmlCards: true,
sentenceExt: 200,
@@ -67,14 +68,14 @@ function optionsSetDefaults(options) {
function optionsVersion(options) {
- const copy = (targetDict, targetKey, sourceDict, sourceKey) => {
- targetDict[targetKey] = sourceDict.hasOwnProperty(sourceKey) ? sourceDict[sourceKey] : targetDict[targetKey];
- };
-
+ optionsSetDefaults(options);
options.version = options.version || 0;
+
const fixups = [
() => {
- optionsSetDefaults(options);
+ const copy = (targetDict, targetKey, sourceDict, sourceKey) => {
+ targetDict[targetKey] = sourceDict.hasOwnProperty(sourceKey) ? sourceDict[sourceKey] : targetDict[targetKey];
+ };
copy(options.general, 'autoStart', options, 'activateOnStartup');
copy(options.general, 'audioPlayback', options, 'enableAudioPlayback');