Home  >  Plugins  >  FirstMagic5  >  DigiCapp  >  installer
Footer
Tuesday, March 14, 2023 By: DigiCanarias Editor

<!--#if expr=" <X-FC-URL-PARAMETER fmlight exists>=0 && `$DEVICE`=`MOBILE`"-->
<!--#if expr="$HASINSTALLER=false"--><div id="appinstall" style="visibility:hidden;opacity:0;">
                                        <h3><!--#echo var="FMGETAPP"--> <span class="closeInstall close2"><a href="javascript:void();" onclick="hideClose2();">X</a></span></h3>
                                        <div class="installcontentbox">
                                                <!--#if expr="@indexof ('$HTTP_USER_AGENT', 'iPhone')>1" -->
                                                <div id="iosnote" class="devicenote">
                                                <br>
                                                <!--#echo var="FMATAP"--> <div class="iosicon"></div> <!--#echo var="FMAIOSADDTOHOME"-->
                                                </div>
                                                <!--#elif expr="@indexof ('$HTTP_USER_AGENT', 'Android')>1" -->
                                                <div id="androidnote" class="devicenote">
                                                <br><!--#echo var="FMATAP"--> <div class="androidicon"></div> <!--#echo var="FMANDROIDADDTOHOME"-->
                                                </div>
                                                <!--#else-->
                                                <div id="genericnote" class="devicenote">
                                                <br><!--#echo var="FMAGENERICTAP"-->
                                                </div>
                                                <!--#endif-->
                                                <div class="clear"></div>
                                        </div>
        </div>
<div id="installBtnWrap"><button id="installBtn" onclick="showInstallDialog();"><!--#echo var="FMGETAPP"--></button><span class="closeInstall"><a href="javascript:void();" onclick="hideApp();">X</a></span></div><!--#else-->
<div id="installBtnWrap"><button id="installBtn"><!--#echo var="FMGETAPP"--></button><span class="closeInstall"><a href="javascript:void();" onclick="hideApp();">X</a></span></div><!--#endif-->

<script>
   if ('serviceWorker' in navigator) {
     navigator.serviceWorker.register('./serviceworker.js').then(function(registration) {
     }, function(error) {console.log('Service Worker not registered');
     });
   } else {
     console.log('Service workers are not supported.');
   }

<!--#if expr="$HASINSTALLER=true"-->let defferedPrompt;
const addbtn = document.querySelector('#installBtn');
const addbtnwrap = document.querySelector('#installBtnWrap');
window.addEventListener('beforeinstallprompt', event => {
   event.preventDefault();
   defferedPrompt = event
    addbtnwrap.style.display = 'block';
});
addbtn.addEventListener('click', event => {
   defferedPrompt.prompt();
   defferedPrompt.userChoice.then(choice => {
       if(choice.outcome === 'accepted'){
           console.log('Accepted')
       }
       defferedPrompt = null;
   })
})<!--#endif-->
function hideApp(){sessionStorage.setItem('dontWantApp', myAppPref);$('installBtnWrap').set('tween', {duration:150}).fade('0');}
function hideClose2(){$('appinstall').set('tween', {duration:150}).fade('0');}
function showInstallDialog(){$('appinstall').set('tween', {duration:150}).fade('1');}
window.addEvent('domready', function() {myAppPref = 'noshow'; if (sessionStorage['dontWantApp']) {$('installBtnWrap').setStyle('display', 'none');}});
</script><!--#endif-->

<script>
var sc_project=12517573; var sc_invisible=1; var sc_security="b8d9f83e";
</script><script src="https://www.statcounter.com/counter/counter.js" async></script>
<noscript><div class="jserrornote"><!--#echo var="NOSCRIPTNOTE"--></div></noscript>

</div>
</body>
</html>

Top of Page