8)) { trkInfo = cookies[i].substring(8); } } if (window.location.protocol == “http:”) { // If “sl” cookie is set, redirect to https. for (var i = 0; i 3)) { window.location.href = “https:” + window.location.href.substring(window.location.protocol.length); return; } } } // Get the new domain. For international domains such as // fr.linkedin.com, we convert it to www.linkedin.com // treat .cn similar to .com here var domain = location.host; if (domain != “www.linkedin.com” && domain != “www.linkedin.cn”) { var subdomainIndex = location.host.indexOf(“.linkedin”); if (subdomainIndex != -1) { domain = “www” + location.host.substring(subdomainIndex); } } window.location.href = “https://” + domain + “/authwall?trk=” + trk + “&trkInfo=” + trkInfo + “&originalReferer=” + document.referrer.substr(0, 200) + “&sessionRedirect=” + encodeURIComponent(window.location.href); } ]]>

Source