Merge branch 'feature/RA-13-dont-show-install-request-window-w' into develop

This commit is contained in:
ostertun
2020-10-02 17:42:39 +02:00

View File

@@ -60,7 +60,7 @@ $(document).ready(function(){
setTimeout(function(){
$('.add-to-home').addClass('add-to-home-visible add-to-home-android');
$('#menu-install-pwa-android, .menu-hider').addClass('menu-active')
},4500);
},3000);
}
} else {
console.log('The div #menu-install-pwa-android was not found. Please add this div to show the install window')
@@ -70,7 +70,12 @@ $(document).ready(function(){
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredPrompt = e;
var welcomActive = $('#menu-welcome').hasClass('menu-active');
if (welcomActive) {
$('#menu-welcome-a-okay').click(showInstallPromotion);
} else {
showInstallPromotion();
}
});
$('.pwa-install').on('click',function(e){
deferredPrompt.prompt();
@@ -94,11 +99,19 @@ $(document).ready(function(){
console.log('iOS Detected');
if($('#menu-install-pwa-ios, .add-to-home').length){
if (!readCookie('Sticky_pwa_rejected_install')) {
function triggerPwaInstallIos() {
console.log('Triggering PWA / Add to Home Screen Menu for iOS');
setTimeout(function(){
$('.add-to-home').addClass('add-to-home-visible add-to-home-ios');
$('#menu-install-pwa-ios, .menu-hider').addClass('menu-active');
},4500);
},3000);
}
var welcomActive = $('#menu-welcome').hasClass('menu-active');
if (welcomActive) {
$('#menu-welcome-a-okay').click(triggerPwaInstallIos);
} else {
triggerPwaInstallIos();
}
};
} else {
console.log('The div #menu-install-pwa-ios was not found. Please add this div to show the install window')