const DOMAIN = 'jompay99h5api.xyz'; const APP_NAME = 'jompay99'; const APK_NAME = 'Jompay99_release.apk'; const ANDROID_PACKAGE_NAME = `com.${APP_NAME}` const IOS_URL_SCHEME = `${APP_NAME}://`; const IOS_URL_DOWNLOAD = 'https://mmk2.com/twDc.html'; const ANDROID_URL_DOWNLOAD = `https://${DOMAIN}/${APP_NAME}/${APK_NAME}`; const ANDROID_INTENT = `intent://${APP_NAME}/#Intent;scheme=http;package=${ANDROID_PACKAGE_NAME};S.browser_fallback_url=https%3A%2F%2F${DOMAIN}%2F${APP_NAME}%2F${APK_NAME};end`; //const FB_ID_OFFICIAL = 177454047700827; //const FB_ID_GROUP = 892464988284685; function checkAppWrap(){ let userAgent = navigator.userAgent || navigator.vendor || window.opera; if (/appwrap/i.test(userAgent)) { return true; } return false } function getParameterByName(name, url = window.location.href) { name = name.replace(/[\[\]]/g, '\\$&'); let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } /*function openFBApp(opt){ let pageId = (opt === 1) ? FB_ID_OFFICIAL : FB_ID_GROUP; let webURL = `https://www.facebook.com/${pageId}`; let os = getMobileOperatingSystem(); let url_schemae = ''; if(os === 'iOS'){ url_schemae = `fb://profile/${pageId}` ; } else { let context = (opt === 1) ? 'page' : 'group'; url_schemae = (os === "Android") ? `fb://${context}/${pageId}` : webURL; } setTimeout(function () { window.location = webURL; }, 2000); window.location = url_schemae; }*/ function openApp(){ let os = getMobileOperatingSystem(); if(os === 'iOS'){ setTimeout(function () { window.location = IOS_URL_DOWNLOAD; }, 25); window.location = IOS_URL_SCHEME } else { let url_schemae = (os === "Android") ? ANDROID_INTENT : ANDROID_URL_DOWNLOAD let appWindow = window.location.replace(url_schemae); setTimeout( function () {if (appWindow) { appWindow.location = ANDROID_URL_DOWNLOAD; } },1000); } } function getMobileOperatingSystem() { let userAgent = navigator.userAgent || navigator.vendor || window.opera; if (/android/i.test(userAgent)) { return "Android"; } if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return "iOS"; } return "others" } function appToggle(){ var status = true; var appOnlyPromotion = ["1️⃣⭐BONUS","2️⃣⭐BONUS"]; var x = document.getElementById("popupwindow"); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { var popupStatus = document.getElementById("popupwindow").childElementCount; if (popupStatus && checkAppWrap() == false && status){ var promotionTitle = document.getElementById("popupwindow").firstElementChild.firstElementChild.firstChild.innerText; if(appOnlyPromotion.includes(promotionTitle)){ var z = document.getElementsByClassName("btn claim"); var lang = String(document.getElementsByTagName('body')[0].getAttribute("class")); switch(lang){ case "C EN": z[0].insertAdjacentHTML("beforebegin", "