diff --git a/frontend/public/games/Flappy Block/script.js b/frontend/public/games/Flappy Block/script.js index af98699f..ff18492c 100644 --- a/frontend/public/games/Flappy Block/script.js +++ b/frontend/public/games/Flappy Block/script.js @@ -54,7 +54,7 @@ function update() { pipes.splice(i, 1); createPipe(); score++; - document.getElementById("score").innerText = `Score: ${score}`; + document.getElementById("score").textContent = `Score: ${score}`; } if (block.x < pipe.x + pipe.width && diff --git a/frontend/public/games/glow-drops/script.js b/frontend/public/games/glow-drops/script.js index d3e389b1..75aeca3c 100644 --- a/frontend/public/games/glow-drops/script.js +++ b/frontend/public/games/glow-drops/script.js @@ -52,7 +52,7 @@ function playBgMusic() { if (!audioCtx) return; - if (bgAudio) { bgAudio.play().catch(()=>{}); return; } + if (bgAudio) { bgAudio.play().catch( => console.error()); return; } bgAudio = new Audio(bgMusicUrl); bgAudio.loop = true; bgAudio.crossOrigin = 'anonymous'; diff --git a/frontend/public/scripts/minesweeper.js b/frontend/public/scripts/minesweeper.js index a87f3deb..de3b9236 100644 --- a/frontend/public/scripts/minesweeper.js +++ b/frontend/public/scripts/minesweeper.js @@ -329,7 +329,7 @@ class Minesweeper { // Restore board content document.querySelectorAll('.cell').forEach(cell => { cell.style.background = cell.style.originalBackground || ''; - const row = parseInt(cell.dataset.row); + const row = parseInt(cell.dataset.row, 10); const col = parseInt(cell.dataset.col); this.updateCellDisplay(row, col); });