installTrigger déprécié

This commit is contained in:
2026-03-27 07:46:34 +01:00
parent 98b3ac7dd4
commit 2076034b37
3 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
let deferredPrompt;
const installBtn = document.getElementById('installBtn');
const isFirefox = typeof InstallTrigger !== 'undefined';
const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');
window.addEventListener('beforeinstallprompt', (e) => {
// Empêche Chrome d'afficher sa propre mini-barre
@@ -29,11 +29,11 @@
});
if (isFirefox && !window.matchMedia('(display-mode: standalone)').matches) {
// On peut par exemple afficher un petit texte dans le header
const infoZone = document.getElementById('app-version'); // On utilise la zone de version
const infoZone = document.getElementById('app-version');
if (infoZone) {
infoZone.innerHTML += " <br><small>(Install. non dispo sur Firefox PC)</small>";
infoZone.style.color = "#ff8800"; // Orange pour attirer l'oeil gentiment
// Message plus pro-actif pour l'utilisateur
infoZone.innerHTML += " <br><small>(Utilisez 'Installer' dans le menu Firefox)</small>";
infoZone.style.color = "#ff8800";
}
}