riddhiman commited on
Commit
827e364
·
verified ·
1 Parent(s): 30ba852

Update public/script.js

Browse files
Files changed (1) hide show
  1. public/script.js +3 -3
public/script.js CHANGED
@@ -22,11 +22,10 @@ window.onload = () => {
22
  function changePage(direction) {
23
  currentPage += direction;
24
  loadMusicList();
25
- updatePageIndicator();
26
  }
27
 
28
- function updatePageIndicator() {
29
- document.getElementById('page-indicator').textContent = `${currentPage} / ${totalPages}`;
30
  }
31
 
32
  function debounce(func, delay) {
@@ -91,6 +90,7 @@ function loadMusicList() {
91
  });
92
 
93
  // Show/hide navigation based on whether there is a search query
 
94
  updateNavigationVisibility(searchQuery, totalPages);
95
  updatePlayingIndicator();
96
  });
 
22
  function changePage(direction) {
23
  currentPage += direction;
24
  loadMusicList();
 
25
  }
26
 
27
+ function updatePageIndicator(totalPages) {
28
+ document.getElementById('page-indicator').textContent = `Page ${currentPage} of ${totalPages}`;
29
  }
30
 
31
  function debounce(func, delay) {
 
90
  });
91
 
92
  // Show/hide navigation based on whether there is a search query
93
+ updatePageIndicator(totalPages);
94
  updateNavigationVisibility(searchQuery, totalPages);
95
  updatePlayingIndicator();
96
  });