ElfYourself&#174


ElfYourself – The #1 Holiday App of All Time! 0) { var qParts = location.search.split(‘?’); qParts[1] = qParts[1] || ”; return ‘&’ + qParts[1]; } else { return ”; } } function bindEvent(element, eventName, eventHandler) { if (element.addEventListener){ element.addEventListener(eventName, eventHandler, false); } else if (element.attachEvent) { element.attachEvent(‘on’ + eventName, eventHandler); } } function fireActivityEvent(customEvent) { switch(customEvent) { case ‘ios’ : var axel = Math.random() + “”; var a = axel * 10000000000000; document.write(‘‘); break; case ‘android’ : var axel = Math.random() + “”; var a = axel * 10000000000000; document.write(‘‘); break; } return true; } function forceHttps() { if (location.protocol == ‘http:’) location.href = location.href.replace(/^http:/, ‘https:’) } function redirect() { //If parent is http url then convert it to https forceHttps(); var u = ”; var doorId = 1384; var doorName = “elfyourself2019”; var mainDoorName = “elfyourself2019”;//During off season values is elfyourself otherwise latest doorname e.g. elfyourself2018 switch(document.domain) { case ‘www.workboy.com’ : case ‘host-vd.oddcast.com’ : u = window.location.protocol + “//host-vd.oddcast.com/” + mainDoorName + “/index.php”; break; case ‘elfyourself-vd2.oddcast.com’ : u = window.location.protocol + “//elfyourself-vd2.oddcast.com”; break; case ‘host-vs.oddcast.com’ : u = window.location.protocol + “//host-vs.oddcast.com/” + mainDoorName + “/index.php”; break; case ‘elfyourself-vs2.oddcast.com’ : u = window.location.protocol + “//elfyourself-vs2.oddcast.com”; break; case ‘host.oddcast.com’ : case ‘host-d.oddcast.com’ : u = window.location.protocol + “//host-d.oddcast.com/” + mainDoorName + “/index.php”; // Load from elfyourself.com u = window.location.protocol + “//elfyourself.oddcast.com”; break; case ‘www.elfyourself.com’ : u = window.location.protocol + “//elfyourself.oddcast.com”; break; default : u = window.location.protocol + “//elfyourself.oddcast.com”; break; } var q = getQuery(); var r = 0; //parseInt(”); var iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/i) ? true : false; var android = navigator.userAgent.match(/Android/i) ? true : false; var mId = null; try { mId = q.match(/mId=([d+]+)/)[1] || 0; } catch (e) { mId = 0; } if (q.indexOf(“page=website_support”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/desktop_support” + location.search); } else if (q.indexOf(“page=desktop_support”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/desktop_support” + location.search); } else if (q.indexOf(“page=mobile_support”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/mobile_support” + location.search); } else if (q.indexOf(“page=privacy”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/privacy” + location.search); } else if (q.indexOf(“page=tos”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/tos” + location.search); } else if (q.indexOf(“page=nft_terms”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/nft/terms” + location.search); } else if (q.indexOf(“page=nft_faq”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/nft/faq” + location.search); } else if (q.indexOf(“page=nft_about”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/docs/nft/about” + location.search); } else if (android && mId == 0) { fireActivityEvent(‘android’); document.location = “https://host.oddcast.com/” + doorName + “/store_android.html”; } else if (iOS && mId == 0) { fireActivityEvent(‘ios’); document.location = “https://host.oddcast.com/” + doorName + “/store_ios.html”; } else if ((iOS || android) && mId > 0 && r == 1) { // document.location = “https://host-d.oddcast.com/php/application_UI/doorId=” + doorId + “/clientId=299/lang=mobile/?mId=” + mId; // document.location = “https://elfyourself.oddcast.com/createyourown?mId=” + mId; $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/createyourown” + location.search); } else if (q.indexOf(“action=thankyou”) > -1) { // $(‘#elfyourself’).attr(“src”, “https://host.oddcast.com/api_misc/” + doorId + “/thankyou.php” + location.search); $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/thankyou” + location.search); } else if (q.indexOf(“action=nft-thankyou”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/nft-thankyou” + location.search + “&demo=1”); } else if (q.indexOf(“action=nft_thankyou”) > -1) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/nft-thankyou” + location.search + “&demo=1”); } else if (q.indexOf(“action=cancel”) > -1) { // $(‘#elfyourself’).attr(“src”, “https://host.oddcast.com/api_misc/” + doorId + “/cancel.php” + location.search); $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/error/” + location.search); } else if (q.indexOf(“action=failure”) > -1) { // $(‘#elfyourself’).attr(“src”, “https://host.oddcast.com/api_misc/” + doorId + “/failure.php” + location.search); $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/error/” + location.search); } else if ((q.indexOf(“demo=”) > -1 || r == 1) && mId > 0) { $(‘#elfyourself’).attr(“src”, “https://elfyourself.oddcast.com/createyourown” + location.search); } else if (q.indexOf(“demo=”) > -1 || r == 1) { //If message id is there redirect according //document.location = u + location.search; $(‘#elfyourself’).attr(“src”, u + location.search); //$(‘#eys2016’).attr(“src”, “https://host-d.oddcast.com/elfyourself2016/index.php”); } else { // when redirecting to countdown page. $(‘#elfyourself’).attr(“src”, window.location.protocol + “//host-d.oddcast.com/elfyourself/countdown.php”); // when redirecting to application page. // $(‘#elfyourself’).attr(“src”, u + location.search); } return; } $(function() { redirect(); }); ]]>

Source