Tigersman commited on
Commit
4d3e6a7
·
verified ·
1 Parent(s): 77eb5c8

Buttonsbare not working at all fix that

Browse files
Files changed (1) hide show
  1. script.js +11 -2
script.js CHANGED
@@ -15,6 +15,9 @@ document.addEventListener('DOMContentLoaded', function() {
15
  const tabButtons = document.querySelectorAll('.tab-button');
16
  const tabContents = document.querySelectorAll('.tab-content');
17
 
 
 
 
18
  tabButtons.forEach(button => {
19
  button.addEventListener('click', function(e) {
20
  e.preventDefault();
@@ -30,9 +33,15 @@ document.addEventListener('DOMContentLoaded', function() {
30
  });
31
  });
32
 
 
 
 
 
 
33
  const textPreview = document.querySelector('.text-preview');
34
- // Request camera permission and initialize camera
35
- async function initializeCamera() {
 
36
  try {
37
  cameraStream = await navigator.mediaDevices.getUserMedia({
38
  video: {
 
15
  const tabButtons = document.querySelectorAll('.tab-button');
16
  const tabContents = document.querySelectorAll('.tab-content');
17
 
18
+ // Initialize tabs - show home tab by default
19
+ document.getElementById('home').classList.add('active');
20
+
21
  tabButtons.forEach(button => {
22
  button.addEventListener('click', function(e) {
23
  e.preventDefault();
 
33
  });
34
  });
35
 
36
+ // Initialize the first tab as active
37
+ const initialTab = document.querySelector('.tab-button[data-tab="home"]');
38
+ if (initialTab) {
39
+ initialTab.classList.add('active');
40
+ }
41
  const textPreview = document.querySelector('.text-preview');
42
+
43
+ // Request camera permission and initialize camera
44
+ async function initializeCamera() {
45
  try {
46
  cameraStream = await navigator.mediaDevices.getUserMedia({
47
  video: {