fixing broken anki template

This commit is contained in:
Alex Yatskov 2017-11-08 17:18:16 -08:00
parent e1d1c109a0
commit 5f6830c7dd
2 changed files with 8 additions and 18 deletions

View File

@ -19,15 +19,6 @@
function optionsFieldTemplates() { function optionsFieldTemplates() {
return ` return `
<style>
.expression-popular {
color: #0275d8;
}
.expression-rare {
color: #999;
}
</style>
{{#*inline "glossary-single"}} {{#*inline "glossary-single"}}
{{~#unless brief~}} {{~#unless brief~}}
{{~#if definitionTags~}}<i>({{#each definitionTags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}} {{~#if definitionTags~}}<i>({{#each definitionTags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}}
@ -277,17 +268,16 @@ function optionsVersion(options) {
} else { } else {
options.general.resultOutputMode = 'split'; options.general.resultOutputMode = 'split';
} }
if (utilStringHashCode(options.anki.fieldTemplates) !== -805327496) { // a3c8508031a1073629803d0616a2ee416cd3cccc if (utilStringHashCode(options.anki.fieldTemplates) !== -805327496) {
options.anki.fieldTemplates = ` options.anki.fieldTemplates = `{{#if merge}}${optionsFieldTemplates()}{{else}}${options.anki.fieldTemplates}{{/if}}`;
{{#if merge}}
${optionsFieldTemplates()}
{{else}}
${options.anki.fieldTemplates}
{{/if}}
`.trim();
} else { } else {
options.anki.fieldTemplates = optionsFieldTemplates(); options.anki.fieldTemplates = optionsFieldTemplates();
} }
},
() => {
if (utilStringHashCode(options.anki.fieldTemplates) === 1285806040) {
options.anki.fieldTemplates = optionsFieldTemplates();
}
} }
]; ];

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Yomichan", "name": "Yomichan",
"version": "1.5.0", "version": "1.5.1",
"description": "Japanese dictionary with Anki integration", "description": "Japanese dictionary with Anki integration",
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"}, "icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},