From 5f1c4bb58fbd55eacf6147b704a8c9512aa07d3f Mon Sep 17 00:00:00 2001 From: zyphlar Date: Sun, 1 Jan 2023 13:01:59 -0800 Subject: [PATCH] Update index.html --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f1298e5..cf63906 100644 --- a/index.html +++ b/index.html @@ -222,6 +222,9 @@ msg.voice = voices[$("#voiceSelect").val()]; synth.speak(msg); }); + if (window.hideTts) { + $(".playtts").hide(); + } }); } @@ -319,8 +322,8 @@ $("#voiceSelect").append(''); }); if (voices.length == 0) { - $("#voiceSelect").attr("disabled", "disabled"); - $("#myvoice").text('Try another browser to use TTS').attr("disabled", "disabled"); + $("#voiceSelect").attr("disabled", "disabled").after('Try another browser to use TTS, or install TTS support for this browser.'); + window.hideTts = true; } let params = new URLSearchParams(document.location.search);