Uncategorized

Q97.1’s Greg and Danny Visit Valley Children’s Hospital

' + '

'; tg_div.querySelector('.close a').onclick = function (e) { e.preventDefault(); document.getElementById("tg-centerpoint").remove(); } var iframe_head = '' + '' + '' + ''; var iframe_body = '
' + '
' + '

Add Our App Now

' + '
Just tap share icon below
' + '
then scroll to
add to home screen
' + '
'; var ifrm = document.getElementById('tg-dialog-frame') ifrm.contentWindow.document.open(); ifrm.contentWindow.document.write(iframe_head+iframe_body); ifrm.contentWindow.document.close(); }, needsToSeePrompt: function() { // check if need iphone prompt let isApple = ['iPhone', 'iPad', 'iPod'].includes(navigator.platform) && navigator.userAgent.indexOf('CriOS') === -1 && navigator.userAgent.indexOf('Safari') > -1; if (isApple) { let standalone = this.getParameter('utm_source') === 'home_screen'; if (navigator.standalone || standalone) { if (typeof(Storage) !== "undefined") { let tgReturningVisitor = localStorage.getItem('tgReturningVisitor'); if (!tgReturningVisitor) { localStorage.setItem('tgReturningVisitor', true); ga('m2gTracker.send', 'event', tg_brand, 'pwa/install', 'wordpress'); console.log('analytics: ' + tg_brand + ', pwa/install, wordpress'); } } else { console.log('no local storage support'); } } else { // should prompt if (typeof(Storage) !== "undefined") { let now = new Date(); // let fortnightBefore = new Date(now - 12096e5); let fortyEightBefore = new Date(now - 172800); let lastPrompt = localStorage.getItem('tgLastSeenPrompt'); if (lastPrompt) { if (lastPrompt === "true") { // second time lastPrompt = new Date(now - 172801); } if (lastPrompt < fortyEightBefore) { localStorage.setItem('tgLastSeenPrompt', now); } return (lastPrompt < fortyEightBefore); } else { // first time localStorage.setItem('tgLastSeenPrompt', "true"); return true; } } } } return false; } } if (tgUtils.needsToSeePrompt()) { tgUtils.writeTGDialogToPage(); } } }); }