/* fz-conv3: blog -> app conversion, loaded from Ghost files (code injection is full). Su 03/11/2026. 1. Mobile sticky CTA bar (QR Pay on QR pages, US$10 eSIM gift elsewhere, none on card pages). 2. Desktop: scan-to-phone QR inside the top box and the end-of-post CTA card (half our readers are on desktop). 3. Mobile tables scroll sideways instead of breaking words letter by letter. 4. Card-paused pages (AI subscriptions etc.): a light 'tell me when the card is back' email box replaces the card gift line; members get the Ghost label 'Card waitlist' (Su 03/11). 5. Desktop: an app link no longer dumps the reader on a store page they cannot install from; it opens a light 'scan with your phone' QR modal for that same link (Su 03/11). GA4: clicks carry data-fzp, read by place() in 'fizen-ga4-events'. */ (function () { if (window.__fzc3) return; window.__fzc3 = 1; var D = document, W = window, path = location.pathname; var L = (D.documentElement.lang || 'en').slice(0, 2); if (/^\/ru\//.test(path)) L = 'ru'; else if (/^\/zh\//.test(path)) L = 'zh'; else if (/^\/es\//.test(path)) L = 'es'; else if (/^\/pt\//.test(path)) L = 'pt'; if (!/^(en|ru|zh|es|pt)$/.test(L)) L = 'en'; // own shortlinks per placement (affiliate dashboard: blog|sitewide|app_download|) var LINK = { qr: 'https://link.fizen.io/s/hCO52bdSc5', esim_ph: 'https://link.fizen.io/s/BEtiZGG32O', // sticky_bar_qr, sticky_bar_esim_ph esim: 'https://link.fizen.io/s/bUy2uA-pOZ', scan: 'https://link.fizen.io/s/69CADP_GPK' }; // sticky_bar_esim, desktop_qr_box var T = { en: { sbG: 'US$10 eSIM gift', sbS: 'For new Fizen app users', qmG: 'US$10 eSIM gift for new users', qmH: 'Download the Fizen Super App', qmP: 'The stablecoin neobank for travelers. Pay by QR with USDT, land online with eSIM.', qmS: 'Scan with your phone camera', gift: 'Your US$10 travel eSIM gift is waiting', giftB: 'Get my gift', getApp: 'Get the app', scan: 'On a computer? Scan with your phone camera to get the app.' }, ru: { sbG: 'Подарок US$10 на eSIM', sbS: 'Новым пользователям Fizen', qmG: 'Подарок US$10 на eSIM новым пользователям', qmH: 'Скачайте Fizen Super App', qmP: 'Необанк на стейблкоинах для путешественников. Оплата по QR в USDT и eSIM, чтобы быть на связи сразу после посадки.', qmS: 'Наведите камеру телефона на код', gift: 'Ваш подарок: US$10 на eSIM для поездки', giftB: 'Забрать', getApp: 'Скачать', scan: 'Вы за компьютером? Наведите камеру телефона, чтобы скачать приложение.' }, zh: { sbG: '送 US$10 旅行 eSIM', sbS: 'Fizen App 新用户专享', qmG: '新用户送 US$10 旅行 eSIM 礼物', qmH: '下载 Fizen 超级 App', qmP: '为旅行者打造。出发前买好旅行 eSIM,落地连上就能用。', qmS: '用手机相机扫码', gift: '新用户送 US$10 旅行 eSIM 礼物', giftB: '领取礼物', getApp: '下载 App', scan: '在电脑上?用手机相机扫码下载 App。' }, es: { sbG: 'Regalo de US$10 en eSIM', sbS: 'Para nuevos usuarios de Fizen', qmG: 'Regalo de US$10 en eSIM para nuevos usuarios', qmH: 'Descarga la Fizen Super App', qmP: 'El neobanco en stablecoins para viajeros. Paga con QR en USDT y conéctate al aterrizar con eSIM.', qmS: 'Escanea con la cámara del móvil', gift: 'Tu regalo de US$10 para eSIM de viaje te espera', giftB: 'Lo quiero', getApp: 'Descargar', scan: '¿En el ordenador? Escanea con la cámara del móvil para descargar la app.' }, pt: { sbG: 'Presente de US$10 em eSIM', sbS: 'Para novos usuários do Fizen', qmG: 'Presente de US$10 em eSIM para novos usuários', qmH: 'Baixe o Fizen Super App', qmP: 'O neobanco em stablecoins para viajantes. Pague QR com USDT no Vietnã e nas Filipinas e fique online ao pousar com eSIM.', qmS: 'Aponte a câmera do celular', gift: 'Seu presente de US$10 em eSIM de viagem está esperando', giftB: 'Quero o meu', getApp: 'Baixar', scan: 'No computador? Aponte a câmera do celular para baixar o app.' } }[L]; var SCAN_SHORT = { en: 'Scan to download', ru: 'Сканируйте, чтобы скачать', zh: '扫码下载', es: 'Escanea para descargar', pt: 'Escaneie para baixar' }[L] || 'Scan to download'; function css(s) { var e = D.createElement('style'); e.textContent = s; D.head.appendChild(e); } css('#fz-sb{position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:9990;display:flex;align-items:center;gap:9px;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);color:#14121f;border:1px solid #ECE7F7;border-radius:18px;padding:9px 8px 9px 9px;box-shadow:0 10px 30px rgba(20,18,31,.14);font:500 14px/1.25 Inter,system-ui,sans-serif;transform:translateY(160%);transition:transform .3s}#fz-sb .i{flex:none;width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#C3FF6B;color:#0E0B18}#fz-sb .i.qr{background:#F1ECFF;color:#6E3BFF}#fz-sb .t{flex:1;min-width:0}#fz-sb .t b{display:block;font-size:14px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#fz-sb .t small{display:block;margin-top:2px;font-size:12px;font-weight:400;color:#7a7390;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}' + '#fz-sb.on{transform:none}#fz-sb .t{flex:1;min-width:0}#fz-sb a.b{flex:none;background:#6E3BFF;color:#fff!important;font-size:13px;font-weight:600;border-radius:999px;padding:9px 13px;text-decoration:none;white-space:nowrap}' + '#fz-sb .x{flex:none;background:none;border:0;color:#a39db5;font-size:18px;line-height:1;padding:4px 4px 4px 0;cursor:pointer}' + '.fz-scan{display:flex;align-items:center;gap:14px;margin-top:14px;font:500 13px/1.4 Inter,system-ui,sans-serif;color:inherit;opacity:.9}.fz-scan img{width:92px;height:92px;background:#fff;padding:6px;border-radius:10px;border:1px solid #E6DEFF;flex:none}.fz-scan{color:#5c5570}' + '.kg-product-card .fz-scan{color:#6b6880;justify-content:center}' + '.fz-qt-row{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:0 0 2px}.fz-qt-row > a.fz-qt-a{margin:0}.fz-qrtop .fz-qt-row .fz-scan{margin:0;flex-direction:column;align-items:center;gap:5px;text-align:center}.fz-qrtop .fz-qt-row .fz-scan img{width:74px;height:74px;padding:5px}.fz-qrtop .fz-qt-row .fz-scan span{font-size:11px;line-height:1.3;max-width:88px;opacity:.75}' + '@media(max-width:767px){.gh-content table td,.gh-content table th{min-width:7.5em;word-break:normal!important;overflow-wrap:normal!important;hyphens:manual}.gh-content table td:first-child,.gh-content table th:first-child{min-width:6.5em}}' + '.fz-wl{background:#FAF8FF;border:1px solid #ECE6FB;border-radius:12px;padding:16px 18px;margin:18px 0 22px;font-family:Inter,system-ui,sans-serif}' + '.fz-wl b{display:block;font-size:16px;font-weight:600;color:#171226;margin-bottom:4px}.fz-wl p{margin:0 0 12px!important;font-size:14px!important;line-height:1.5!important;color:#5c5570}' + '.fz-wl form{display:flex;gap:8px;flex-wrap:wrap}.fz-wl input{flex:1 1 200px;min-width:0;border:1px solid #E0D8F5;border-radius:10px;padding:10px 12px;font:400 15px Inter,system-ui,sans-serif;color:#171226;background:#fff}' + '.fz-wl input:focus{outline:none;border-color:#6E3BFF}.fz-wl button{flex:none;background:#6E3BFF;color:#fff;border:0;border-radius:10px;padding:10px 16px;font:600 15px Inter,system-ui,sans-serif;cursor:pointer}' + '.fz-wl button[disabled]{opacity:.6}.fz-wl .ok{font-size:14px;color:#171226;margin:0}.fz-wl small{display:block;margin-top:8px;font-size:12px;color:#8b84a3}' + '#fz-qm{position:fixed;inset:0;z-index:100000;background:rgba(23,18,38,.35);display:flex;align-items:center;justify-content:center;font-family:Inter,system-ui,sans-serif}' + '#fz-qm .c{position:relative;background:#fff;border:1px solid #E6DEFF;border-radius:16px;padding:30px 32px 24px;width:400px;text-align:center;box-shadow:0 20px 50px rgba(23,18,38,.18)}' + '#fz-qm .g{display:inline-flex;align-items:center;gap:7px;background:#C3FF6B;color:#0E0B18;border-radius:999px;padding:6px 13px;font-size:13px;font-weight:500;margin-bottom:14px}#fz-qm .g svg{flex:none}#fz-qm .g i{font-style:normal}' + '#fz-qm b,#fz-qm p{text-wrap:balance}#fz-qm b{display:block;font-size:26px;line-height:1.12;letter-spacing:-.02em;font-weight:600;color:#14121f;margin:0 0 10px}#fz-qm p{margin:0 auto 20px;max-width:330px;font-size:15px;line-height:1.5;color:#5c5570}' + '#fz-qm .sc{display:block;margin-top:10px;font-size:12.5px;color:#8b84a3}#fz-qm .t{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:16px;font-size:12px;color:#8a8499}#fz-qm .c .t img{height:16px!important;width:72px!important;max-width:none!important;padding:0!important;border:0!important;background:none!important;box-sizing:content-box!important;margin:0!important;border-radius:0!important}' + '#fz-qm .q{display:block;width:200px;height:200px;margin:2px auto 0!important;padding:14px;box-sizing:content-box;border:1px solid #ECE7F7;border-radius:16px;background:#fff;image-rendering:pixelated;max-width:none}' + '#fz-qm .s{display:flex;gap:10px;justify-content:center;margin-top:18px}' + '#fz-qm .s a{display:flex;align-items:center;gap:8px;height:42px;padding:0 14px;border-radius:9px;background:#000;color:#fff!important;text-decoration:none!important;text-align:left;line-height:1.1}#fz-qm .s a:hover{opacity:.88}' + '#fz-qm .s a{white-space:nowrap;flex:none}#fz-qm .s a img{height:22px!important;width:auto!important;margin:0!important;border-radius:0!important;padding:0!important;border:0!important;background:none!important}#fz-qm .s small{display:block;font-size:9px;color:rgba(255,255,255,.8);letter-spacing:.02em}#fz-qm .s strong{display:block;font-size:14px;font-weight:500;color:#fff}' + '#fz-qm .x{position:absolute;top:8px;right:10px;background:none;border:0;font-size:22px;color:#8b84a3;cursor:pointer}' + '@media(max-width:767px){body.fz-has-sb #fzg-box{display:none!important}}@media(max-width:999px){.fz-scan{display:none}}@media(min-width:768px){#fz-sb{display:none}}'); /* ---------- what is this page selling ---------- */ function intent() { var box = D.querySelector('.fz-qrtop'), gl = D.querySelector('.fz-gl'); if (box && !box.classList.contains('fz-esimtop')) { var h = box.innerText || ''; var txt = /Philippines/.test(h) ? 'Pay any QR Ph with USDT' : /Vietnam/.test(h) ? 'Pay any VietQR with USDT' : 'Pay local QR with USDT'; return { k: 'qr', t: txt, s: 'No cash, no local bank. Free app', b: L === 'en' ? 'Get app' : T.getApp, u: LINK.qr }; } if (box) return { k: 'esim', t: T.sbG, s: T.sbS, b: T.giftB, u: LINK.esim_ph }; if (gl && gl.getAttribute('data-v') === 'card') return null; // card paused: nothing to sell on these pages if (gl && gl.getAttribute('data-v') === 'qr' && L === 'en') return { k: 'qr', t: 'Pay local QR with USDT', s: 'No cash, no local bank. Free app', b: T.getApp, u: LINK.qr }; if (!D.querySelector('.gh-content, .post-content, article')) return null; return { k: 'esim', t: T.sbG, s: T.sbS, b: T.giftB, u: LINK.esim }; } /* ---------- 1. mobile sticky bar ---------- */ function sticky() { if (W.innerWidth >= 768) return; try { if (sessionStorage.getItem('fzsb')) return; } catch (e) {} var it = intent(); if (!it) return; var bar = D.createElement('div'); bar.id = 'fz-sb'; bar.setAttribute('data-fzp', 'sticky_bar_' + it.k); var ic = it.k === 'qr' ? '' : ''; bar.innerHTML = '' + ic + ''; bar.querySelector('.t b').textContent = it.t; bar.querySelector('.t small').textContent = it.s || ''; var a = bar.querySelector('a.b'); a.textContent = it.b; a.href = it.u; D.body.appendChild(bar); D.body.classList.add('fz-has-sb'); // one floating element on mobile, not two var shown = false, cardIn = false, seen = {}; // hide while the top box or the end CTA card is on screen if ('IntersectionObserver' in W) [D.querySelector('.kg-product-card'), D.querySelector('.fz-qrtop')].forEach(function (el, i) { if (el) new IntersectionObserver(function (es) { seen[i] = es[0].isIntersecting; cardIn = seen[0] || seen[1]; tick(); }).observe(el); }); function tick() { var ov = D.getElementById('fzg-ov'), pop = ov && getComputedStyle(ov).display !== 'none' && ov.offsetParent !== null; var want = W.scrollY > 600 && !cardIn && !pop; if (want !== shown) { shown = want; bar.classList.toggle('on', want); } } bar.querySelector('.x').onclick = function () { bar.remove(); try { sessionStorage.setItem('fzsb', '1'); } catch (e) {} D.body.classList.remove('fz-has-sb'); if (typeof gtag === 'function') gtag('event', 'sticky_bar_close', { kind: it.k }); }; W.addEventListener('scroll', tick, { passive: true }); setInterval(tick, 1500); tick(); } /* ---------- 2. desktop scan-to-phone QR ---------- */ function qrImg(url, cb) { function go() { try { var q = qrcode(0, 'M'); q.addData(url); q.make(); cb(q.createDataURL(8, 0)); } catch (e) {} } if (W.qrcode) return go(); var s = D.createElement('script'); s.src = 'https://cdnjs.cloudflare.com/ajax/libs/qrcode-generator/1.4.4/qrcode.min.js'; s.onload = go; D.head.appendChild(s); } function scan(host, url, where) { if (!host || host.querySelector('.fz-scan')) return; qrImg(url, function (src) { var d = D.createElement('div'); d.className = 'fz-scan'; d.setAttribute('data-fzp', where); d.innerHTML = 'QR code to get the Fizen app'; d.querySelector('img').src = src; var inBox = host.classList && host.classList.contains('fz-qrtop'); d.querySelector('span').textContent = inBox ? SCAN_SHORT : T.scan; var btn = inBox && host.querySelector('a.fz-qt-a'); if (btn) { // button left, QR right, on one line var row = D.createElement('div'); row.className = 'fz-qt-row'; btn.parentNode.insertBefore(row, btn); row.appendChild(btn); row.appendChild(d); } else host.appendChild(d); if (typeof gtag === 'function') gtag('event', 'desktop_qr_shown', { placement: where }); }); } function desktop() { if (W.innerWidth < 1000) return; /* no static QR in the top box either (Su 03/11): it stretched the box and pushed the CTA down. Desktop readers who click an app link still get the scan modal from desktopLinks(). */ /* end-of-post product card: no static QR there (Su 03/11, it made the card long for no gain). Desktop readers who click an app link still get the scan modal from desktopLinks(). */ } /* ---------- 4. card waitlist (card paused) ---------- */ var WL = { en: ['Waiting for the Fizen Card to come back?', 'The card is paused for now. Leave your email and we will write once, the day it reopens.', 'Notify me', 'Done. Check your inbox and confirm your email.', 'One email when the card is back. Unsubscribe any time.'], ru: ['Ждёте возвращения карты Fizen?', 'Карта временно на паузе. Оставьте email, и мы напишем один раз, в день, когда она вернётся.', 'Сообщить мне', 'Готово. Подтвердите адрес в письме.', 'Одно письмо, когда карта вернётся. Отписаться можно в любой момент.'], es: ['¿Esperas el regreso de la tarjeta Fizen?', 'La tarjeta está en pausa por ahora. Déjanos tu email y te escribiremos una sola vez, el día que vuelva.', 'Avísame', 'Listo. Revisa tu correo y confirma tu email.', 'Un solo email cuando vuelva la tarjeta. Puedes darte de baja cuando quieras.'], pt: ['Esperando o cartão Fizen voltar?', 'O cartão está pausado por enquanto. Deixe seu email e escrevemos uma única vez, no dia em que voltar.', 'Me avise', 'Pronto. Confira seu email para confirmar.', 'Um único email quando o cartão voltar. Cancele quando quiser.'] }[L]; function waitlist() { var gl = D.querySelector('.fz-gl[data-v="card"]'); if (!gl || !WL) return; var box = D.createElement('div'); box.className = 'fz-wl'; box.setAttribute('data-fzp', 'card_waitlist'); box.innerHTML = '

'; box.querySelector('b').textContent = WL[0]; box.querySelector('p').textContent = WL[1]; box.querySelector('button').textContent = WL[2]; box.querySelector('small').textContent = WL[4]; gl.parentNode.replaceChild(box, gl); D.querySelectorAll('.fz-sub').forEach(function (e) { e.remove(); }); // one email ask per page var f = box.querySelector('form'), inp = f.querySelector('input'), btn = f.querySelector('button'); f.addEventListener('submit', function (e) { e.preventDefault(); var em = inp.value.trim(); if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(em)) { inp.focus(); inp.style.borderColor = '#e5484d'; return; } btn.disabled = true; fetch('/members/api/integrity-token/', { credentials: 'same-origin' }).then(function (r) { return r.text(); }).then(function (tok) { return fetch('/members/api/send-magic-link/', { method: 'POST', credentials: 'same-origin', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: em, emailType: 'signup', labels: ['Card waitlist'], integrityToken: tok, urlHistory: [] }) }); }).then(function (r) { if (!r.ok) throw 0; f.outerHTML = '

'; box.querySelector('.ok').textContent = WL[3]; if (typeof gtag === 'function') { gtag('event', 'sign_up', { method: 'card_waitlist' }); gtag('event', 'card_waitlist_submit', { post_slug: path.replace(/^\/|\/$/g, '') }); } }).catch(function () { btn.disabled = false; inp.style.borderColor = '#e5484d'; }); }); } /* ---------- 6. end CTA card: value in two lines, no limits (Su 03/11) ---------- */ var SHORT = { en: { vn: 'Made for travelers in Vietnam: scan any VietQR, MoMo, VNPay or ZaloPay code and pay with USDT. The shop gets dong. Free app, plus a US$10 eSIM gift for new users.', ph: 'Made for travelers in the Philippines: scan any QR Ph code and pay with USDT. The shop gets pesos. Free app, plus a US$10 eSIM gift for new users.', esim: 'Online the moment you land. New Fizen app users get a US$10 eSIM gift, then US$2 credit after every order. Pay with USDT or card. Free app.' }, ru: { vn: 'Для путешественников во Вьетнаме: сканируйте любой VietQR, MoMo, VNPay или ZaloPay и платите в USDT. Продавец получает донги. Приложение бесплатное, новым пользователям подарок US$10 на eSIM.', ph: 'Для путешественников на Филиппинах: сканируйте любой QR Ph и платите в USDT. Продавец получает песо. Приложение бесплатное, новым пользователям подарок US$10 на eSIM.', esim: 'Интернет сразу после посадки. Новым пользователям Fizen подарок US$10 на eSIM и US$2 после каждого заказа. Оплата в USDT или картой. Приложение бесплатное.' }, zh: { esim: '出发前买好,落地连上 Wi-Fi 即可安装上网。Fizen App 新用户送 US$10 旅行 eSIM 礼物,每单再返 US$2。App 免费下载。' }, es: { vn: 'Para viajeros en Vietnam: escanea cualquier VietQR, MoMo, VNPay o ZaloPay y paga con USDT. La tienda recibe dongs. App gratis y un regalo de US$10 en eSIM para nuevos usuarios.', ph: 'Para viajeros en Filipinas: escanea cualquier QR Ph y paga con USDT. La tienda recibe pesos. App gratis y un regalo de US$10 en eSIM para nuevos usuarios.', esim: 'Conectado desde que aterrizas. Los nuevos usuarios de la app Fizen reciben un regalo de US$10 en eSIM y US$2 tras cada pedido. Paga con USDT o tarjeta. App gratis.' }, pt: { vn: 'Para viajantes no Vietnã: escaneie qualquer VietQR, MoMo, VNPay ou ZaloPay e pague com USDT. A loja recebe dongs. App grátis e um presente de US$10 em eSIM para novos usuários.', ph: 'Para viajantes nas Filipinas: escaneie qualquer QR Ph e pague com USDT. A loja recebe pesos. App grátis e um presente de US$10 em eSIM para novos usuários.', esim: 'Online assim que pousar. Novos usuários do app Fizen ganham um presente de US$10 em eSIM e US$2 após cada pedido. Pague com USDT ou cartão. App grátis.' } }[L] || {}; var NOPE = /KYC|US\$\s?800|1[ ,.]?000|per week|a week|resident|Not for|limit|лимит|не для|резидент|в неделю|US Person|美国人士|居民|限额|限制|residente|límite|limite|semana|estadounidense|americanas/i; function shortCard() { var d = D.querySelector('.kg-product-card-description'); if (!d) return; var t = (d.innerText || '').trim(), n = L === 'zh' ? t.length / 3 : t.split(/\s+/).length; if (n <= 35) return; var out = ''; if (/QR Pay|VietQR|QR Ph/i.test(t)) out = /VietQR|MoMo|VNPay|ZaloPay/i.test(t) ? SHORT.vn : /QR Ph|GCash|Maya/i.test(t) ? SHORT.ph : ''; else if (/eSIM/i.test(t)) out = SHORT.esim; if (!out) { // other languages: keep the value sentences, drop the rule sentences, stop near 35 words var parts = t.match(/[^.!?。!?]+[.!?。!?]?/g) || [t], w = 0; for (var i = 0; i < parts.length; i++) { var p = parts[i].replace(/\s*[((][^))]*[))]/g, '').trim(); if (!p || NOPE.test(p)) continue; var pw = L === 'zh' ? p.length / 3 : p.split(/\s+/).length; if (out && w + pw > 35) break; out += (out && L !== 'zh' ? ' ' : '') + p; w += pw; } } if (out) d.innerHTML = '

', d.querySelector('p').textContent = out; } /* ---------- 5. desktop: app link -> scan-to-phone modal ---------- */ var IOS = 'https://apps.apple.com/app/id1621269508', PLAY = 'https://play.google.com/store/apps/details?id=com.fizen.io.wallet'; function modal(url) { var old = D.getElementById('fz-qm'); if (old) old.remove(); var m = D.createElement('div'); m.id = 'fz-qm'; m.setAttribute('data-fzp', 'desktop_qr_modal'); var gift = ''; m.innerHTML = ''; // no crypto pitch to mainland readers m.querySelector('.g i').textContent = T.qmG; m.querySelector('b').textContent = T.qmH; m.querySelector('p').textContent = T.qmP; m.querySelector('.sc').textContent = T.qmS; var as = m.querySelectorAll('.s a'); as[0].href = IOS; as[1].href = PLAY; // a shortlink already carries its tracking, so drop any query: fewer modules, a cleaner code to scan qrImg(/link\.fizen\.io\/s\//.test(url) ? url.split('?')[0] : url, function (src) { m.querySelector('.q').src = src; }); function close() { m.remove(); D.removeEventListener('keydown', esc); } function esc(e) { if (e.key === 'Escape') close(); } m.addEventListener('click', function (e) { if (e.target === m || e.target.className === 'x') close(); }); D.addEventListener('keydown', esc); D.body.appendChild(m); if (typeof gtag === 'function') gtag('event', 'desktop_qr_modal', { link_url: url.split('?')[0] }); } function desktopLinks() { D.addEventListener('click', function (e) { // bubble phase: the GA click logger (capture) has already run if (W.innerWidth < 1000 || !W.matchMedia('(pointer:fine)').matches) return; var a = e.target.closest && e.target.closest('a[href]'); if (!a || a.closest('#fz-qm')) return; if (!/link\.fizen\.io\/s\/|fizen\.io\/app|apps\.apple\.com|play\.google\.com/.test(a.href)) return; if (e.metaKey || e.ctrlKey || e.shiftKey) return; e.preventDefault(); e.stopPropagation(); modal(a.href); }); } desktopLinks(); function init() { shortCard(); setTimeout(function () { waitlist(); sticky(); desktop(); }, 600); } // after fz-qrtop / declutter have run if (D.readyState === 'loading') D.addEventListener('DOMContentLoaded', init); else init(); })();