From bed16022e08a2877f16ae0971c0e7c4605724258 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 31 Jan 2017 21:10:20 -0800 Subject: fix dictionary priority visibility bug --- ext/bg/js/options-form.js | 2 ++ ext/bg/js/options.js | 16 ---------------- ext/manifest.json | 2 +- 3 files changed, 3 insertions(+), 17 deletions(-) (limited to 'ext') diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index 92596773..ed2826b4 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -164,6 +164,8 @@ function populateDictionaries(options) { ++dictCount; }); + updateVisibility(options); + $('.dict-enabled, .dict-priority').change(onOptionsChanged); $('.dict-delete').click(onDictionaryDelete); }).catch(error => { diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index ca2792c0..863e8916 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -98,22 +98,6 @@ function optionsVersion(options) { copy(options.anki.kanji, 'model', options, 'ankiKanjiModel'); copy(options.anki.kanji, 'fields', options, 'ankiKanjiFields'); - const fixupFields = fields => { - const fixups = { - '{expression-furigana}': '{furigana}', - '{glossary-list}': '{glossary}' - }; - - for (const name in fields) { - for (const fixup in fixups) { - fields[name] = fields[name].replace(fixup, fixups[fixup]); - } - } - }; - - fixupFields(options.anki.terms.fields); - fixupFields(options.anki.kanji.fields); - for (const title in options.dictionaries) { const dictionary = options.dictionaries[title]; dictionary.enabled = dictionary.enableTerms || dictionary.enableKanji; diff --git a/ext/manifest.json b/ext/manifest.json index 2ac61690..2b2a4617 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Yomichan", - "version": "1.0.6", + "version": "1.0.7", "description": "Japanese dictionary with Anki integration", "icons": {"16": "img/icon16.png", "48": "img/icon48.png", "128": "img/icon128.png"}, -- cgit v1.2.3