Empêcher game.js de charger sur mobile

This commit is contained in:
François Pelletier 2024-09-01 13:15:10 -04:00
parent 15957f0462
commit e334b61b32
2 changed files with 17 additions and 5 deletions

View file

@ -17,8 +17,11 @@ function checkDeviceType() {
}
}
// Make isMobileDevice function globally accessible
window.isMobileDevice = isMobileDevice;
// Run the check when the page loads
window.addEventListener('load', checkDeviceType);
// Also run the check if the window is resized (in case of device rotation)
window.addEventListener('resize', checkDeviceType);
window.addEventListener('resize', checkDeviceType);