Empêcher game.js de charger sur mobile
This commit is contained in:
parent
15957f0462
commit
e334b61b32
2 changed files with 17 additions and 5 deletions
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue