Spaces:
Running
Running
Update play.html
Browse files115 unmodified lines116117118119119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149115 unmodified lines</div>
<script>document.addEventListener('DOMContentLoaded', () => {
// 1. Previene il "Pinch to Zoom" (Pizzico con due dita) su tutto il documento document.addEventListener('touchmove', function (event) { if (event.touches.length > 1) { event.preventDefault(); // Blocca se ci sono più di 1 dito } }, { passive: false });
// 2. Previene il doppio tap veloce (Zoom) su tutto il documento let lastTouchEnd = 0; document.addEventListener('touchend', function (event) { const now = (new Date()).getTime(); if (now - lastTouchEnd <= 300) { event.preventDefault(); } lastTouchEnd = now; }, false);
// 3. Gestione specifica per il contenitore del gioco (Massima priorità) const gameContainer = document.querySelector('.game-zoom-container'); if (gameContainer) { gameContainer.addEventListener('touchmove', function(e) { // Impedisce qualsiasi movimento della pagina mentre si gioca e.preventDefault(); }, { passive: false }); }});/** * ========================================================================================== * ⚙️ CONFIGURAZIONE DI GIOCO - MATTEO INNOVATION LAB EDITION play.html+28-1