diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-02-05 11:44:59 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-02-05 11:44:59 -0800 |
commit | 5076b80f9690a12fda23d06b2c3ddd1df08cff56 (patch) | |
tree | 9f04555e22dd1387d8e3d80930e8a30497cd0719 /ext/bg/js/options.js | |
parent | a13c32a784ec41c9e46d841c14e790ffa4ab7466 (diff) |
tweaks for ankiconnect1.0.8
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 11 |
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'); |