fix dictionary priority visibility bug
This commit is contained in:
parent
bf9925ec9c
commit
bed16022e0
@ -164,6 +164,8 @@ function populateDictionaries(options) {
|
|||||||
++dictCount;
|
++dictCount;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updateVisibility(options);
|
||||||
|
|
||||||
$('.dict-enabled, .dict-priority').change(onOptionsChanged);
|
$('.dict-enabled, .dict-priority').change(onOptionsChanged);
|
||||||
$('.dict-delete').click(onDictionaryDelete);
|
$('.dict-delete').click(onDictionaryDelete);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -98,22 +98,6 @@ function optionsVersion(options) {
|
|||||||
copy(options.anki.kanji, 'model', options, 'ankiKanjiModel');
|
copy(options.anki.kanji, 'model', options, 'ankiKanjiModel');
|
||||||
copy(options.anki.kanji, 'fields', options, 'ankiKanjiFields');
|
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) {
|
for (const title in options.dictionaries) {
|
||||||
const dictionary = options.dictionaries[title];
|
const dictionary = options.dictionaries[title];
|
||||||
dictionary.enabled = dictionary.enableTerms || dictionary.enableKanji;
|
dictionary.enabled = dictionary.enableTerms || dictionary.enableKanji;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Yomichan",
|
"name": "Yomichan",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
|
|
||||||
"description": "Japanese dictionary with Anki integration",
|
"description": "Japanese dictionary with Anki integration",
|
||||||
"icons": {"16": "img/icon16.png", "48": "img/icon48.png", "128": "img/icon128.png"},
|
"icons": {"16": "img/icon16.png", "48": "img/icon48.png", "128": "img/icon128.png"},
|
||||||
|
Loading…
Reference in New Issue
Block a user