riddhiman commited on
Commit
9ba1026
·
verified ·
1 Parent(s): 9fbf05a

Update public/script.js

Browse files
Files changed (1) hide show
  1. public/script.js +3 -2
public/script.js CHANGED
@@ -3,6 +3,7 @@ let isLoadingMusic = false; // Flag to manage loading state
3
  let currentPlaying = ''; // Store the filename of the currently playing music
4
  let trackList = []; // Store currently displayed track filenames
5
  let currentPage = 1;
 
6
 
7
  window.onload = () => {
8
  // Attach click handlers for paging
@@ -24,8 +25,8 @@ function changePage(direction) {
24
  updatePageIndicator();
25
  }
26
 
27
- function updatePageIndicator(totalPages) {
28
- document.getElementById('page-indicator').textContent = `${currentPage}:${totalPages}`;
29
  }
30
 
31
  function debounce(func, delay) {
 
3
  let currentPlaying = ''; // Store the filename of the currently playing music
4
  let trackList = []; // Store currently displayed track filenames
5
  let currentPage = 1;
6
+ let totalPages = 0;
7
 
8
  window.onload = () => {
9
  // Attach click handlers for paging
 
25
  updatePageIndicator();
26
  }
27
 
28
+ function updatePageIndicator() {
29
+ document.getElementById('page-indicator').textContent = `${currentPage} / ${totalPages}`;
30
  }
31
 
32
  function debounce(func, delay) {