tylermullen commited on
Commit
c280318
·
verified ·
1 Parent(s): 6669f26

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +9 -9
index.js CHANGED
@@ -277,15 +277,6 @@ let audioUrl = undefined;
277
  async function initMedia() {
278
  versionText.textContent = use_e4b ? 'E4B' : 'E2B';
279
  toggleVersionButton.textContent = use_e4b ? 'Switch to E2B' : 'Switch to E4B';
280
- toggleVersionButton.addEventListener('click', () => {
281
- const url = new URL(window.location.href);
282
- if (use_e4b) {
283
- url.searchParams.set('e2b', 'true');
284
- } else {
285
- url.searchParams.delete('e2b');
286
- }
287
- window.location.href = url.href;
288
- });
289
 
290
  // Disable controls on startup
291
  promptInputElement.disabled = true;
@@ -445,6 +436,15 @@ clearCacheButton.addEventListener('click', async () => {
445
  }
446
  }
447
  });
 
 
 
 
 
 
 
 
 
448
 
449
  // --- Initialization ---
450
  document.addEventListener('DOMContentLoaded', initMedia);
 
277
  async function initMedia() {
278
  versionText.textContent = use_e4b ? 'E4B' : 'E2B';
279
  toggleVersionButton.textContent = use_e4b ? 'Switch to E2B' : 'Switch to E4B';
 
 
 
 
 
 
 
 
 
280
 
281
  // Disable controls on startup
282
  promptInputElement.disabled = true;
 
436
  }
437
  }
438
  });
439
+ toggleVersionButton.addEventListener('click', () => {
440
+ const url = new URL(window.location.href);
441
+ if (use_e4b) {
442
+ url.searchParams.set('e2b', 'true');
443
+ } else {
444
+ url.searchParams.delete('e2b');
445
+ }
446
+ window.location.href = url.href;
447
+ });
448
 
449
  // --- Initialization ---
450
  document.addEventListener('DOMContentLoaded', initMedia);