summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-07 12:03:10 -0500
committerGitHub <noreply@github.com>2020-11-07 12:03:10 -0500
commitbe952a1857da88de33322a8070252881d7b99391 (patch)
tree09f0ca98d52452018e453a62b7aa097f04a18812 /ext/mixed
parent7fa478295496d16bfc99dd80858544900c7b0a4c (diff)
Disable the audio button when no sources are enabled (#1003)
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 19634525..0d724aa0 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -722,7 +722,7 @@ class Display extends EventDispatcher {
_updateDocumentOptions(options) {
const data = document.documentElement.dataset;
data.ankiEnabled = `${options.anki.enable}`;
- data.audioEnabled = `${options.audio.enabled}`;
+ data.audioEnabled = `${options.audio.enabled && options.audio.sources.length > 0}`;
data.compactGlossaries = `${options.general.compactGlossaries}`;
data.enableSearchTags = `${options.scanning.enableSearchTags}`;
data.showPitchAccentDownstepNotation = `${options.general.showPitchAccentDownstepNotation}`;