diff --git a/index.html b/index.html index 67c9d393..786cdc5b 100644 --- a/index.html +++ b/index.html @@ -51,17 +51,20 @@ try { var standalone = (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches) || window.navigator.standalone === true; - var profile = false, skipped = false, hasImport = false; + var profile = false, skipped = false, hasBootFragment = false; // Deux clés : `multiplix-profiles` (index multi-profils) et // `multiplix-profile` (ancien schéma mono-profil, migré au boot). try { profile = !!(localStorage.getItem('multiplix-profiles') || localStorage.getItem('multiplix-profile')); } catch (e) {} try { skipped = localStorage.getItem('multiplix-skip-install') === '1'; } catch (e) {} - // Profil dans le fragment d'URL → on boote l'app directement (pas la - // landing) : #import= (migration cross-origin depuis l'ancien domaine) - // ou #transfer= (transfert depuis un autre appareil, QR de l'espace - // parent). L'import réel a lieu dans main.tsx. - try { hasImport = location.hash.indexOf('import=') !== -1 || location.hash.indexOf('transfer=') !== -1; } catch (e) {} - if (standalone || profile || skipped || hasImport) { + // Fragment d'URL porteur d'un profil ou d'un appairage → on boote + // l'app directement (pas la landing) : #import= (migration + // cross-origin depuis l'ancien domaine), #transfer= (transfert depuis + // un autre appareil, QR de l'espace parent), ou #watch= (suivi à + // distance : un parent scanne le QR de l'appareil de son enfant, et + // n'a rien à faire de la landing). Le traitement réel a lieu dans + // main.tsx. + try { hasBootFragment = /(import|transfer|watch)=/.test(location.hash); } catch (e) {} + if (standalone || profile || skipped || hasBootFragment) { document.documentElement.classList.add('skip-static-landing'); } // Langue de l'interface (globale) : préférence explicite stockée, @@ -79,7 +82,7 @@ if (lang === 'en') { document.title = 'Tablito — Practise the times tables (free, no ads)'; var desc = document.querySelector('meta[name="description"]'); - if (desc) desc.setAttribute('content', 'Free, ad-free app to learn the multiplication tables gently, from age 7. Leitner method, no grades or rankings, works offline. Data stays on the device.'); + if (desc) desc.setAttribute('content', 'Free, ad-free app to learn the multiplication tables gently, from age 7. Leitner method, no grades or rankings, works offline. Data stays on the device by default.'); // Manifest localisé : le standard n'a pas de description multilingue, // donc un fichier par langue, basculé ici (le // existe déjà plus haut). Seule la `description` diffère ; le nom et @@ -123,7 +126,7 @@ media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" /> Tablito — Réviser les tables de multiplication (gratuit, sans pub) - +