From 0b602925ab54932adbc9910337b5ee5993c44326 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 28 Oct 2017 08:11:33 -0700 Subject: cleanup --- ext/bg/settings.html | 12 ++++++------ ext/mixed/js/display.js | 6 ++++-- tmpl/terms.html | 12 ++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ext/bg/settings.html b/ext/bg/settings.html index f430d5e2..12556065 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -55,7 +55,7 @@ @@ -140,11 +140,6 @@

Dictionaries

-
- - -
-

Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled, or you can simply purge the database to delete everything. @@ -160,6 +155,11 @@

+
+ + +
+
Dictionary data is being imported, please be patient...
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 41fe85eb..5d3c4f2e 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -185,7 +185,8 @@ class Display { 80: /* p */ () => { if (e.altKey) { if ($('.entry').eq(this.index).data('type') === 'term') { - this.audioPlay(this.definitions[this.index], this.options.general.resultOutputMode === 'merge' ? 0 : -1); + const expressionIndex = this.options.general.resultOutputMode === 'merge' ? 0 : -1; + this.audioPlay(this.definitions[this.index], expressionIndex); } return true; @@ -387,7 +388,8 @@ class Display { try { this.spinner.show(); - let url = await apiAudioGetUrl(expressionIndex === -1 ? definition : definition.expressions[expressionIndex], this.options.general.audioSource); + const expression = expressionIndex === -1 ? definition : definition.expressions[expressionIndex]; + let url = await apiAudioGetUrl(expression, this.options.general.audioSource); if (!url) { url = '/mixed/mp3/button.mp3'; } diff --git a/tmpl/terms.html b/tmpl/terms.html index 245a0ea1..35dedb71 100644 --- a/tmpl/terms.html +++ b/tmpl/terms.html @@ -44,9 +44,9 @@ {{#if merged}} {{~#each expressions~}} -
{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}
+
+ {{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}} +
{{~#if ../playback~}} {{~/if~}} @@ -64,9 +64,9 @@ {{/each~}}
{{~/if~}} -
+
+ +
{{~/each~}} {{else}}
{{#kanjiLinks}}{{#furigana}}{{{.}}}{{/furigana}}{{/kanjiLinks}}
-- cgit v1.2.3