summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-10-28 08:11:33 -0700
committerAlex Yatskov <alex@foosoft.net>2017-10-28 08:11:33 -0700
commit0b602925ab54932adbc9910337b5ee5993c44326 (patch)
tree004a7267668a4a240b3caf7890e2699760b22bde /ext/mixed
parent25ae2e475ab15cbc241818812137c9cf28c2da3a (diff)
cleanup
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js6
1 files changed, 4 insertions, 2 deletions
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';
}