APmanageur Wi-Fi V1.0

This commit is contained in:
yoannmultigaming committed 2026-11-20 02:59:00 +01:00
1 parent d585c81d48
commit b128ce2eed
3 files changed
+17 -10

No files matched your search

+9 -9
View File
@@ -15,7 +15,7 @@
--blue: #5ca7ff;
--blue-btn-text: #071326;
--board-bg: #050d1a;
--grid-line: #0e203c;
--grid-line: #162c50;
}
html[data-theme="light"] {
--bg: #f2f5fa;
@@ -330,16 +330,12 @@
} else {
delete document.documentElement.dataset.macosMode;
}
if (typeof ctx !== 'undefined' && ctx && typeof board !== 'undefined' && board) {
draw();
drawNext();
}
}
const urlParams = new URLSearchParams(window.location.search);
setTheme(urlParams.get('theme') || 'dark', urlParams.get('macosMode'));
// Global Game State (declared before applyTetrisLang to avoid TDZ errors)
// Global Game State & Variables (declared early to prevent TDZ errors)
let isMusicEnabled = true;
let isPaused = false;
let isGameOver = false;
@@ -422,6 +418,10 @@
window.addEventListener('message', e => {
if (e.data && e.data.type === 'themeChange') {
setTheme(e.data.theme, e.data.macosMode);
try {
if (typeof draw === 'function') draw();
if (typeof drawNext === 'function') drawNext();
} catch (_) {}
}
if (e.data && e.data.type === 'langChange') {
applyTetrisLang(e.data.lang);
@@ -675,9 +675,9 @@
level: 1
};
let nextPiece = null;
dropCounter = 0;
dropInterval = 1000;
lastTime = 0;
let dropCounter = 0;
let dropInterval = 1000;
let lastTime = 0;
function createMatrix(w, h) {
const m = [];