Spaces:
Runtime error
Runtime error
Update public/script.js
Browse files- 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(
|
| 28 |
-
document.getElementById('page-indicator').textContent = `${currentPage}
|
| 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) {
|