-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse.html
More file actions
1 lines (1 loc) · 1.63 KB
/
Copy pathresponse.html
File metadata and controls
1 lines (1 loc) · 1.63 KB
1
<html><head>\n<script type="text/javascript">\nwindow.onload = function() {\n // Parse the tracking code from cookies.\n var trk = "sentinel_org_block";\n var cookies = document.cookie.split("; ");\n for (var i = 0; i < cookies.length; ++i) {\n if ((cookies[i].indexOf("trkCode=") == 0) && (cookies[i].length > 8)) {\n trk = cookies[i].substring(8);\n }\n }\n\n // Get the protocol for the redirect url.\n var protocol = "http:";\n if (window.location.protocol == "https:") {\n protocol = "https:";\n } else {\n // If "sl" cookie is set, redirect to https.\n for (var i = 0; i < cookies.length; ++i) {\n if ((cookies[i].indexOf("sl=") == 0) && (cookies[i].length > 3)) {\n window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);\n return;\n }\n }\n }\n\n // Get the new domain. For touch.www.linkedin.com or tablet.www.linkedin.com\n // we strip "touch." and "tablet.". For international domains such as\n // fr.linkedin.com, we convert it to www.linkedin.com\n var domain = location.host;\n if (domain.substr(0, 6) == "touch.") {\n domain = domain.substr(6);\n } else if (domain.substr(0, 7) == "tablet.") {\n domain = domain.substr(7);\n } else if (domain.charAt(2) == ".") {\n domain = "www" + domain.substr(2);\n }\n \n window.location.href = "https://" + domain + "/uas/login?trk=" + trk + "&session_redirect=" +\n encodeURIComponent(protocol + "//" + domain +\n window.location.href.substr(window.location.href.search(window.location.host) +\n window.location.host.length));\n}\n</script>\n</head></html>