Merge branch 'feature/RA-13-dont-show-install-request-window-w' into develop
This commit is contained in:
@@ -60,7 +60,7 @@ $(document).ready(function(){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$('.add-to-home').addClass('add-to-home-visible add-to-home-android');
|
$('.add-to-home').addClass('add-to-home-visible add-to-home-android');
|
||||||
$('#menu-install-pwa-android, .menu-hider').addClass('menu-active')
|
$('#menu-install-pwa-android, .menu-hider').addClass('menu-active')
|
||||||
},4500);
|
},3000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('The div #menu-install-pwa-android was not found. Please add this div to show the install window')
|
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) => {
|
window.addEventListener('beforeinstallprompt', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
deferredPrompt = e;
|
deferredPrompt = e;
|
||||||
showInstallPromotion();
|
var welcomActive = $('#menu-welcome').hasClass('menu-active');
|
||||||
|
if (welcomActive) {
|
||||||
|
$('#menu-welcome-a-okay').click(showInstallPromotion);
|
||||||
|
} else {
|
||||||
|
showInstallPromotion();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$('.pwa-install').on('click',function(e){
|
$('.pwa-install').on('click',function(e){
|
||||||
deferredPrompt.prompt();
|
deferredPrompt.prompt();
|
||||||
@@ -94,11 +99,19 @@ $(document).ready(function(){
|
|||||||
console.log('iOS Detected');
|
console.log('iOS Detected');
|
||||||
if($('#menu-install-pwa-ios, .add-to-home').length){
|
if($('#menu-install-pwa-ios, .add-to-home').length){
|
||||||
if (!readCookie('Sticky_pwa_rejected_install')) {
|
if (!readCookie('Sticky_pwa_rejected_install')) {
|
||||||
console.log('Triggering PWA / Add to Home Screen Menu for iOS');
|
function triggerPwaInstallIos() {
|
||||||
setTimeout(function(){
|
console.log('Triggering PWA / Add to Home Screen Menu for iOS');
|
||||||
$('.add-to-home').addClass('add-to-home-visible add-to-home-ios');
|
setTimeout(function(){
|
||||||
$('#menu-install-pwa-ios, .menu-hider').addClass('menu-active');
|
$('.add-to-home').addClass('add-to-home-visible add-to-home-ios');
|
||||||
},4500);
|
$('#menu-install-pwa-ios, .menu-hider').addClass('menu-active');
|
||||||
|
},3000);
|
||||||
|
}
|
||||||
|
var welcomActive = $('#menu-welcome').hasClass('menu-active');
|
||||||
|
if (welcomActive) {
|
||||||
|
$('#menu-welcome-a-okay').click(triggerPwaInstallIos);
|
||||||
|
} else {
|
||||||
|
triggerPwaInstallIos();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
console.log('The div #menu-install-pwa-ios was not found. Please add this div to show the install window')
|
console.log('The div #menu-install-pwa-ios was not found. Please add this div to show the install window')
|
||||||
|
|||||||
Reference in New Issue
Block a user