aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-11-08 17:18:27 -0800
committerAlex Yatskov <alex@foosoft.net>2017-11-08 17:18:27 -0800
commit6489d8cee06205ee827df6320a0347df5aaf5842 (patch)
treef084ba36ce6050316a30c466f0f6e53dd6234a5b /ext/bg/js/options.js
parentd505edb94b27ecd8cbaaecd11cbebfbe12b16164 (diff)
parent5f6830c7dd88520ebf41c24ab51e2c3240039939 (diff)
Merge branch 'dev'
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js24
1 files changed, 7 insertions, 17 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 9f1414ad..925c8432 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -19,15 +19,6 @@
function optionsFieldTemplates() {
return `
-<style>
-.expression-popular {
- color: #0275d8;
-}
-
-.expression-rare {
- color: #999;
-}
-</style>
{{#*inline "glossary-single"}}
{{~#unless brief~}}
{{~#if definitionTags~}}<i>({{#each definitionTags}}{{name}}{{#unless @last}}, {{/unless}}{{/each}})</i> {{/if~}}
@@ -277,17 +268,16 @@ function optionsVersion(options) {
} else {
options.general.resultOutputMode = 'split';
}
- if (utilStringHashCode(options.anki.fieldTemplates) !== -805327496) { // a3c8508031a1073629803d0616a2ee416cd3cccc
- options.anki.fieldTemplates = `
-{{#if merge}}
-${optionsFieldTemplates()}
-{{else}}
-${options.anki.fieldTemplates}
-{{/if}}
-`.trim();
+ if (utilStringHashCode(options.anki.fieldTemplates) !== -805327496) {
+ options.anki.fieldTemplates = `{{#if merge}}${optionsFieldTemplates()}{{else}}${options.anki.fieldTemplates}{{/if}}`;
} else {
options.anki.fieldTemplates = optionsFieldTemplates();
}
+ },
+ () => {
+ if (utilStringHashCode(options.anki.fieldTemplates) === 1285806040) {
+ options.anki.fieldTemplates = optionsFieldTemplates();
+ }
}
];