From be952a1857da88de33322a8070252881d7b99391 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 7 Nov 2020 12:03:10 -0500 Subject: Disable the audio button when no sources are enabled (#1003) --- ext/mixed/js/display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}`; -- cgit v1.2.3