Spaces:
Running
Running
Update index.html
Browse files36 unmodified lines373839404142506 unmodified lines54955055155255355455555655755855956056156256356456556656756856957057157257357436 unmodified linesoverflow-x: hidden;-webkit-font-smoothing: antialiased;cursor: default;}/* Typography */506 unmodified linesiframe.contentWindow.focus();}// --- FIX DOPPIO TAP ZOOM ---document.addEventListener('DOMContentLoaded', () => {const gameContainer = document.querySelector('.game-zoom-container');let lastTouchEnd = 0;if (gameContainer) {// 1. Previeni doppio tap veloce (zoom)gameContainer.addEventListener('touchend', function (event) {const now = (new Date()).getTime();if (now - lastTouchEnd <= 300) {event.preventDefault();}lastTouchEnd = now;}, false);// 2. Previeni pinch-to-zoom manualegameContainer.addEventListener('touchmove', function (event) {if (event.scale && event.scale !== 1) {event.preventDefault();}}, { passive: false });}});36 unmodified lines37383940414243506 unmodified lines55055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958036 unmodified linesoverflow-x: hidden;-webkit-font-smoothing: antialiased;cursor: default;touch-action: manipulation;}/* Typography */506 unmodified linesiframe.contentWindow.focus();}document.addEventListener('DOMContentLoaded', () => {// 1. Previene il "Pinch to Zoom" (Pizzico con due dita) su tutto il documentodocument.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 documentolet 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 giocae.preventDefault();}, { passive: false });}});
index.html+23-17