Redirection Page

Games News

Redirection Page <![CDATA[ $(document).ready(function () { var currenturl = window.location.href; var Browser = getQryStrParamValues('br'); var ExtensionID = getQryStrParamValues('xid'); var PartnerCode = getQryStrParamValues('pc'); // Safari App Extension if (ExtensionID == 113) { var cookieName = "PartnerCode"; localStorage.setItem(cookieName, PartnerCode); var domain = "domain=" + window.location.hostname; var path = "path=/"; var date = new Date(); date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000)); var expires = date.toUTCString(); document.cookie = cookieName + "=" + PartnerCode + ";expires=" + expires + ";" + domain + ";" + path; location.replace("https://apps.apple.com/app/microsoft-bing-for-safari/id1560727432"); return false; } if (ExtensionID <= 100) { if (Browser != "mf" && Browser != "gc" && Browser != "me") { window.location = "https://www.bing.com/"; } } else { //detect the browser and assign it to mf/gc/me and for other browser redirect it to bing.com getBrowserValues(); } var Channel = getQryStrParamValues('channel'); var bmkt = getQryStrParamValues('bmkt'); var _bec = getQryStrParamValues('bt'); var ExtnPartnerCode = getQryStrParamValues('partnercode'); var giveCid = getQryStrParamValues('cid'); var machineid = getQryStrParamValues('mi'); var DefaultHPPC = "HIBF"; var domain = "domain=" + window.location.hostname; var path = "path=/"; var Macid = ""; if (machineid != undefined && machineid != null && machineid != "") { Macid = "&MI=" + machineid ; } if (ExtensionID == 114) { Browser = "gc"; } if (Browser == "mf") { //Generate MachineID so that both AppInsights Request logs from MF Welcome Page and //Extensions will have/use same MachineID as this is the entry point for Extension promotions //(except the ones happening through Applications like BW and UNIWIN) if (machineid == undefined || machineid == null || machineid == "") { Macid = "&MI=" + guid(); } //Store the User language as bmkt value in cookie if the same is not received via query string if (bmkt == undefined || bmkt == null || bmkt == "") { bmkt = (navigator.language || navigator.userLanguage).toLowerCase(); } //Stores OS Platform value under browserdefaults domain setOSPlatform(); } if (ExtensionID == 111 && Browser == "gc") { setCookieswithExtnid("ddojnmkongaimkdddgmcccldlfhokcfb="); } else if (ExtensionID == 26 && Browser == "gc") { setCookieswithExtnid("bgloedfmlbhadhmokjlglkainpfpkcol="); } else if (ExtensionID == 27 && Browser == "gc") { setCookieswithExtnid("hkecabaloghleaicfhefejdijblljpco="); } else if (ExtensionID == 28 && Browser == "gc") { setCookieswithExtnid("ojdbadadahfdgoiiolagmlngdgaecbah="); } else if ((ExtensionID == 3 || ExtensionID == 107) && Browser == "gc") { setCookieswithExtnid("jhikancdgcieieaapcjmbpjflikjgkpn="); } else if (ExtensionID == 114 && Browser == "gc") { setCookieswithExtnid("pjhcpooacdljimmmkpbknccbedoaagai="); } else if ((ExtensionID == 6 || ExtensionID == 106) && Browser == "mf") { setCookieswithExtnid("MicrosoftRewards@microsoft.com="); } else if (ExtensionID == 14 && Browser == "mf") { setCookieswithExtnid("surface@microsoft.com="); } else if ((ExtensionID == 7 || ExtensionID == 104) && Browser == "mf") { setCookieswithExtnid("xbox@microsoft.com="); } else if ((ExtensionID == 5 || ExtensionID == 109) && Browser == "mf") { setCookieswithExtnid("{0615d03f-8319-4442-8710-d488cfbf01ba}="); } else if ((ExtensionID == 4 || ExtensionID == 110) && Browser == "mf") { setCookieswithExtnid("MicrosoftSolitaire@microsoft.com="); } else if ((ExtensionID == 17 || ExtensionID == 108) && Browser == "mf") { setCookieswithExtnid("lol@microsoft.com="); } else if ((ExtensionID == 15 || ExtensionID == 105) && Browser == "mf") { setCookieswithExtnid("minecraftbe@microsoft.com="); } else if ((ExtensionID == 2 || ExtensionID == 107) && Browser == "mf") { setCookieswithExtnid("{de0a6401-5089-4e02-920c-97a3bf70f644}="); } else if ((ExtensionID == 1 || ExtensionID == 111) && Browser == "mf") { setCookieswithExtnid("{3e06d96e-26f5-4a68-ac64-2b6bc583a35d}="); } else if (ExtensionID == 3 && Browser == "mf") { setCookieswithExtnid("bingsearchweb@microsoft.com="); } else if (ExtensionID == 112 && Browser == "mf") { setCookieswithExtnid("hockey@microsoft.com="); } else if (ExtensionID == 11 && Browser == "mf") { setCookieswithExtnid("MicrosoftNewsDHP@microsoft.com="); } else if (ExtensionID == 10 && Browser == "mf") { setCookieswithExtnid("MicrosoftNewsDHPDSE@microsoft.com="); } else if (ExtensionID == 9 && Browser == "mf") { setCookieswithHPExtnid("bingsearch_HIBF@microsoft.com="); } else if (ExtensionID == 19 && Browser == "me") { setCookieswithExtnid("glcchjhehdpcjjgamnjcglcjeljijiia="); } else { if (Channel == undefined || Channel == null || Channel == "") Channel = "organic"; if (Channel != undefined) { document.cookie = "channel=" + Channel + ";" + domain + ";" + path; } if (bmkt != undefined) { document.cookie = "bmkt=" + bmkt + ";" + domain + ";" + path; } if (_bec != undefined) { document.cookie = "_bec=" + _bec + ";" + domain + ";" + path; } if (ExtnPartnerCode != undefined) { document.cookie = "PCCodeSE=" + ExtnPartnerCode + ";" + domain + ";" + path; } if (giveCid != undefined) { document.cookie = "givecid=" + giveCid + ";" + domain + ";" + path; } if (PartnerCode != undefined) { document.cookie = "pc=" + PartnerCode + ";" + domain + ";" + path; } } // Create the cookies for Partner code /* If (Partner code is present in query string parameter) Read the partner code from query string param and write it in cookies Else if (Channel is present and mapping with PC in JSON) Read the partner code from JSON and write it in cookies Else Write default partner code in browserdefaults.microsoft.com domain cookies */ /* if (PartnerCode == undefined && Channel != undefined) { // Read the partner code from JSON $.getJSON("extnDetails.json", function (responseJSON) { PartnerCode = responseJSON["PCChannelMapping"][Channel]; }); } setTimeout(function () { if (PartnerCode != undefined) { document.cookie = "pc=" + PartnerCode + ";" + domain + ";" + path; } }, 300);*/ /* Function to create an unique machine id */ function guid() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } MachineGUID = s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4(); MachineGUID = MachineGUID.toLocaleUpperCase(); return MachineGUID; } function setCookieswithExtnid(extnid) { var doccookie = ""; if ((PartnerCode != undefined && PartnerCode != null && PartnerCode != "") && (Channel != undefined && Channel != null && Channel != "")) { doccookie = extnid + "PC=" + PartnerCode + "&CH=" + Channel + Macid; } else if ((PartnerCode != undefined && PartnerCode != null && PartnerCode != "") && (Channel == undefined || Channel == null || Channel == "")) { doccookie = extnid + "PC=" + PartnerCode + Macid; } else if ((Channel != undefined && Channel != null && Channel != "") && (PartnerCode == undefined || PartnerCode == null || PartnerCode == "")) { doccookie = extnid + "CH=" + Channel + Macid; } else if ((PartnerCode == undefined || PartnerCode == null || PartnerCode == "") && (Channel == undefined || Channel == null || Channel == "") && (machineid != undefined && machineid != null && machineid != "")) { doccookie = extnid + "MI=" + machineid; } if ((doccookie) && (bmkt != undefined && bmkt != null && bmkt != "" && bmkt != "undefined")) { doccookie += "&BM=" + bmkt; } else if (bmkt != undefined && bmkt != null && bmkt != "") { doccookie = extnid + "BM=" + bmkt; } if ((doccookie) && (_bec != undefined && _bec != null && _bec != "" && _bec != "undefined")) { doccookie += "&_bec=" + _bec; } else if (_bec != undefined && _bec != null && _bec != "") { doccookie = extnid + "_bec=" + _bec; } //Store cookie when PC or MI or Mkt is available if(doccookie) { document.cookie = doccookie + ";" + domain + ";" + path; } } function setCookieswithHPExtnid(extnid) { var doccookie = ""; if (ExtnPartnerCode != undefined && ExtnPartnerCode != "" && ExtnPartnerCode != null) { doccookie = extnid + "PC=" + ExtnPartnerCode + Macid; } else { doccookie = extnid + "PC=" + DefaultHPPC + Macid; } if ((doccookie) && (Channel != undefined && Channel != null && Channel != "" && Channel != "undefined")) { doccookie += "&CH=" + Channel; } else if ((doccookie) && (Channel == undefined || Channel == null || Channel == "")) { doccookie += "&CH=" + "organic"; } else if (Channel != undefined && Channel != null && Channel != "") { doccookie = extnid + "CH=" + Channel + Macid; } else if (Channel == undefined || Channel == null || Channel == "") { doccookie = extnid + "CH=" + "organic" + Macid; } if ((doccookie) && (bmkt != undefined && bmkt != null && bmkt != "" && bmkt != "undefined")) { doccookie += "&BM=" + bmkt; } else if (bmkt != undefined && bmkt != null && bmkt != "") { doccookie = extnid + "BM=" + bmkt + Macid; } if (doccookie) { document.cookie = doccookie + ";" + domain + ";" + path; } } //Sends OneDS Pings function sendOneDSPing(behaviorName, actionTypeValue, contentNameValue, contentIdValue) { if ("undefined" != typeof analytics) { var overrideValues = { behavior: behaviorName, actionType: actionTypeValue, contentTags: { contentName: contentNameValue, contentId: contentIdValue } }; analytics.capturePageAction(null, overrideValues); } } // Rediret to corresponding extension offer page redirectToURL(Browser, ExtensionID); function getQryStrParamValues(param) { var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i

This article originally appeared on https://browserdefaults.microsoft.com/extn/redirect/?xid=106&channel=percard

Brian Jones

Author and owner of WantedDroid.com - scouring the internet for all the news related to Android. Contact me here: https://wanteddroid.com/contact/

Leave a Reply