var myArray = ["facebook"]; let redirect_url = ""; if(true){ const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const device = urlParams.get("device"); if(urlParams.get("checkout_url")){ redirect_url = urlParams.get("checkout_url"); }else{ redirect_url = urlParams.get("redirect_url"); } const application = urlParams.get("application"); if(device == "mobile" && application != null){ window.location.href = "http://shop.miniorange.com/social-login/openidcallback/"+application+"?state="+device+"&shop=lurettaindonesiavisaservices.myshopify.com&hosts="+window.location.host+""; } }; var cartValue = getCookie("cart"); createCookie("cart",cartValue,15); function getCookie(cookieName) { let cookie = {}; document.cookie.split(";").forEach(function(el) { let [key,value] = el.split("="); cookie[key.trim()] = value; }) return cookie[cookieName]; } function createCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } document.cookie = name + "=" + value + expires + "; path=/"; }if(document.getElementById("mo_openid_login")){ document.getElementById("mo_openid_login").insertAdjacentHTML("beforebegin", "
"); }else if(document.getElementById("customer_login")){ document.getElementById("customer_login").insertAdjacentHTML("beforebegin", "
"); }else if(document.getElementById("RegisterForm")){ document.getElementById("RegisterForm").insertAdjacentHTML("beforebegin", "
"); } var logout_redirect=""; var logout_redirect_enable=""; if(document.getElementById("customer_logout_link") && logout_redirect_enable==1){ document.getElementById("customer_logout_link").setAttribute("onClick", "mo_logout_redirect()"); } function mo_logout_redirect(){ var b=window.open("https://lurettaindonesiavisaservices.myshopify.com"+logout_redirect); wait(200); var a=window.open("", "_self", "").close(); } function wait(ms){ var start = new Date().getTime(); var end = start; while(end < start + ms) { end = new Date().getTime(); } } document.head.insertAdjacentHTML("afterbegin",""); document.head.insertAdjacentHTML("afterbegin",""); document.head.insertAdjacentHTML("afterbegin",""); myArray.reverse().forEach(function (value) { if(document.getElementById("mo_openid_login")){ if(value == "google"){ document.getElementById("mo_openid_login").insertAdjacentHTML("afterbegin"," login with Google
") }else if(value == "kakao" || value == "naver" || value == "yahoojapan"){ document.getElementById("mo_openid_login").insertAdjacentHTML("afterbegin"," login with "+value[0].toUpperCase()+value.slice(1)+"
") }else{ var icons = value; var css_icon = value; if(value == "wechat"){ icons = "weixin"; css_icon = "wechat"; }else if(value == "windowslive"){ icons = "windows"; css_icon = "microsoft"; }else if(value == "vkontakte"){ icons = "vk"; css_icon = "vk"; }else if(value == "amazon"){ icons = "amazon"; css_icon = "soundcloud"; } document.getElementById("mo_openid_login").insertAdjacentHTML("afterbegin"," login with "+value[0].toUpperCase()+value.slice(1)+"
") } } });