fix: CSP compliance for inline styles and scripts
This commit is contained in:
@@ -55,7 +55,7 @@ function addPWAScripts() {
|
||||
|
||||
// Afficher le bouton d'installation s'il existe
|
||||
if (installButton) {
|
||||
installButton.style.display = 'block';
|
||||
installButton.classList.remove('is-hidden');
|
||||
installButton.addEventListener('click', function() {
|
||||
deferredPrompt.prompt();
|
||||
deferredPrompt.userChoice.then(function(choiceResult) {
|
||||
@@ -63,7 +63,7 @@ function addPWAScripts() {
|
||||
console.log('PWA installée');
|
||||
}
|
||||
deferredPrompt = null;
|
||||
installButton.style.display = 'none';
|
||||
installButton.classList.add('is-hidden');
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -73,7 +73,7 @@ function addPWAScripts() {
|
||||
window.addEventListener('appinstalled', function() {
|
||||
console.log('PWA installée avec succès');
|
||||
if (installButton) {
|
||||
installButton.style.display = 'none';
|
||||
installButton.classList.add('is-hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user