TheVera commited on
Commit
46c3b9c
·
verified ·
1 Parent(s): dfbcdaa

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +8 -8
script.js CHANGED
@@ -151,13 +151,13 @@ function toggleSpeak() {
151
  }
152
 
153
 
154
- // Close the modal when clicking outside of it
155
- // window.onclick = function(event) {
156
- // const modal = document.getElementById("settingsModal");
157
- // if (event.target === modal) {
158
- // closeSettings();
159
- // }
160
- // }
161
 
162
 
163
  function startNewChat() {
@@ -181,7 +181,7 @@ function startNewChat() {
181
 
182
  // Text-to-Speech function
183
  function speakText(text, language) {
184
- f (!isSpeakEnabled) {
185
  console.log('Speech is disabled.');
186
  return; // Exit if speech is disabled
187
  }
 
151
  }
152
 
153
 
154
+ Close the modal when clicking outside of it
155
+ window.onclick = function(event) {
156
+ const modal = document.getElementById("settingsModal");
157
+ if (event.target === modal) {
158
+ closeSettings();
159
+ }
160
+ }
161
 
162
 
163
  function startNewChat() {
 
181
 
182
  // Text-to-Speech function
183
  function speakText(text, language) {
184
+ if (!isSpeakEnabled) {
185
  console.log('Speech is disabled.');
186
  return; // Exit if speech is disabled
187
  }